Complete Juce/C++ noob here, so apologies in advance for asking what I am sure must be very basic question.
I am trying to wrap my head around IIRFilters in Juce in order to build a basic 3 band EQ. So far I managed to get a single filter working, but I am seeking advise about how to proceed with adding additional bands/filters.
Do I need to create 3 instances of IIRFilter, one for each band? If so, I assume that each filter is applied to the audio buffer in series. Does the order in which the filters are applied matter?
[quote=“jnicol, post:1, topic:20331”]
Do I need to create 3 instances of IIRFilter, one for each band?[/quote]Yes[quote=“jnicol, post:1, topic:20331”]If so, I assume that each filter is applied to the audio buffer in series.[/quote]Yes[quote=“jnicol, post:1, topic:20331”]Does the order in which the filters are applied matter?
[/quote]No (barring quantization errors of math) - can be proved through associativity of convolution
Bring 'em on, I’m sure people here can help. If you ever want to explore or dive deeper in to filter technicalities, modulate the filter’s center frequencies or want improved precision for low frequencies, you can check the zero-delay state variable filters out as designed here:
They also work out of the box, and are stable for any kind of modulation with less artifacts, contrary to the biquad designs the IIRFilter objects are based upon.
Maybe you already knew this, but in case you didn’t : one for each band for every channel you need to process. (So, for a 3 band EQ that you want to use for stereo audio, you will need 6 filter instances.)
I understand, but given any parametric EQ, any filter can assume any parameters. Thus, the order of the filters does not really matter as you can modulate any parameter of any filter in any position in the chain (you can change the high band to a low band). Well, as said, it can matter but the only difference is the position - hence the comment about dynamically changing it, the product of misbehaviour is from the alisaing and violation of the lti system.