There is already a "Mixing Desk" style Equalizer on the wiki
, but I think that it could still be useful to have a dedicated "Parametric Eq".
What I have in mind is a "small" plug-in that does just one job, but does it well (much like the "Notch Filter
" does). To this end I've hacked your code and stripped it down to a single band parametric equalizer.
I've beefed up the error checking a little so as to avoid data corruption if the selected frequency is too high for the sample rate.
I've also adjusted the range of some of the controls:
In practice, users tend to think of the "width" control just in terms of "wide or narrow" rather than "octaves" (at least, that's what I do
) so I've adjusted the width control so that it is just a scale of 0 (most narrow) to 10 (widest). The centre position (5) has a "half gain bandwidth" of 2.5 octaves, which gives a very usable "medium" width.
Technically speaking, the width control in this version is approximately: "half gain width in 1/2 octaves".
The frequency range is from 10 Hz to 10 kHz (or 1/4 of the sample rate if this is lower). This makes the slider a little awkward to use, but as a single band effect I think it needs to have a wide frequency range.
I've also added the usual header comment block.
So what do you think? Is this useful? Too complicates or too simple? Any changes that you would want to make?