Question for Vinnie (switching filters on the fly)

Hi Vinnie,

I am experimenting with your Dsp::Filters and really enjoying how great this stuff is!

The demo provides some nice clues about how to switch filters, but I am still puzzled how to implement a filter that from the GUI perspective is a band pass/stop with positive/negative gain.

I have encapsulated filters in EqBandProcessor instances, which also handle the links with Values (for the parameters) and provide update info for an EqResponseClass (which shows the curves for all the bands), if there is an editor.

The filters themselves are based on the typical equations that we find in the literature, so it's either pass or stop, which have different "cookings" for the parameter values.

My idea is: as soon as my EqBandProcessor detects a switch in gain past zero, it creates a new filter with the appropriate design/parameters and overwrites the current one. Is this the best approach? Or can you change the design of a filter without re-creating it?

[Which brings me to the question: the demo does this as well and there is no explicit deletion of the previous filter - is this OK?]

Thanks for any tips!

Peter

Perhaps you're looking for a "peaking filter"? I'm not sure what your filter response class requires, but the equations here http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt generate coeffeicents for the biquad architecture. No architectural or formula changes.  Just re-cooking the coeffecients whenever the parameters are changed.

cheers

m

Thanks. But Vinnies classes already include the RBJ filters as well ;-) Check out DspFilters on GitHub, great stuff

^ Oh awesome!