How to start designing a filter function

Hi all,

I’m still pretty new to dsp design. I want to build a filter function giving my signal path a specified frequency weighting.

But I have no clue where to start. Any hint for a beginner to this topic?


I would highly encourage you to read Will Pirkle’s “Designing Audio Effect Plugins In C++”. It has everything and more to get you started. :slight_smile:

Thanks Aapo. I’m just reading Will Pirkle’s book at the moment and studying how filters work. My question is more about how to decide what kind of filters to use and how to design them to reach a frequency weighting like the above.

If the filter’s curve stays static, I’d suggest using Finite Impulse Response (FIR) filter for the job.

Yes, it stays static.

But do you mean one filter per band or is there a way create one filter that will result in the above response?

Looks like this can probably be achieved with a high-pass, a low-pass and a peaking.

High-pass looks to be around 6dB/octave, so a 1st-order butterworth will do the job there. Cutoff appears to be around 1000Hz.

Low-pass is maybe 30dB/octave? So that’d be a 5th-order butterworth I think, with a cutoff of around 13kHz.

Then a peaking filter with a gain of 6.6dB at 6.3kHz - you’d need to play with the Q value to get the width correct.

Might be useful to start by plotting the table you have above to be able to compare to, then maybe try to recreate it in some EQ plugin?

1 Like

FIR filters can have as complex frequency response curves as you like. It’s just a single filter which handles lots of frequency bands at the same time. They are highly useful and probably the most used filter type in DSP.

JUCE seems to have ready made algorithms for this. I haven’t tried them yet but a quick glance at them seems to look like they could be useful for you.

1 Like