Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crossover Equalizer - Glitch on transients #3421

Open
zonkmachine opened this issue Mar 13, 2017 · 5 comments
Open

Crossover Equalizer - Glitch on transients #3421

zonkmachine opened this issue Mar 13, 2017 · 5 comments
Labels

Comments

@zonkmachine
Copy link
Member

The Crossover Equalizer could use some interpolation. It's riddled with glitches on suddenly increased values of the crossover frequency knobs. Interestingly the glitches seem only to be present on increase and not decrease of the knob value.
crossoverequalizerglitch.mmp.zip

See earlier issue #3339 and its fix #3343

@PaulBatchelor
Copy link
Contributor

@zonkmachine best way to do that is with a 1-pole smoothing filter. If there isn't a class for this, one should exist (I can make this)

@michaelgregorius
Copy link
Contributor

Here you can find some code for a smoothing filter:
http://www.musicdsp.org/archive.php?classid=3#257

@PhysSong
Copy link
Member

For example, Calf Filter has a control called "Intertia" for that purpose.
https://calf-studio-gear.org/doc/Filter.html

@PaulBatchelor
Copy link
Contributor

PaulBatchelor commented May 29, 2020

The code for sp_port can be used as a smoothing filter:

https:/PaulBatchelor/Soundpipe/blob/master/modules/port.c

The frequency knob value is read at the beginning of a render block (a control-rate signal), then passed into the smoothing filter as an input signal. The smoothing filter works inside the render block at audio rate.

"inertia" is the smoothing amount. Usually this is represented as a tau coefficient, which can be roughly thought of as smoothing time. In sp_port this is the htime variable.

@PaulBatchelor
Copy link
Contributor

Did some digging.

The crossover EQ filter is made up of a few instances of StereoLinkWitzRiley filters, which is a basic filter type used all over LMMS. It only calculates things on a per-sample basis, and there is no support for block-rate parameter smoothing.

It actually turns out in the same file where the StereoLinkWitzRiley filters are defined (BasicFilters, there is also perfectly suitable code for a onepole smoother. I would build a class on top of this called ParameterSmoother or something that elegantly handles the parameter updates and block-rate to audio-rate signal conversion + smoothing.

The way to update LinkWitzRiley filter is with the setLowpass and setHighpass methods. This would need to be called at audio-rate any time the audio-rate output from ParameterSmoother changes. There should definitely be audio-rate parameter caching of some sort so that these methods don't get called every time... it looks like the filter does a full bilinear transform in order to calculate the coefficients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants