1
$\begingroup$

I hope this isn't a dublicate . I checked but maybe didn't see everything.

Here goes :

I've been scratching my head over some EQ related questions. I read a lot of papers but my limited math and DSP knowledge prevents me from fully understanding them, so I thought I'd ask the experts.

I hghave a good library (http://www.kvraudio.com/forum/viewtopic.php?t=249926 in case you wonder) of standalone filters. There are biquad filters and higher order filters. From that, I'd like to create an equalizer. This is C++ but I don't think it's relevant;. My questions refer to the signal processing side.

1) Can I just casacade the filters :

input signal -> processed through f1 -> ... -> processed through fn -> output signal ?

2) Given that filters are not perfect, does the order matters ?

3) Do you know how I can calculate the transfer curve of the EQ, from each filter's transfer curve ?

4) Finally, what kind of filter is best ? From what I read, I think it's better to use high order filters instead of quadratic, so I think I should use Butterworth or Chebyshev filters. Am I right ?

I'm currently a bit lost so thanks for ANY insight ! What I would like is to maximize the sound quality 9i.e : make a transparent eq, nothing too fancy) , even if the CPU cost is high, or even better, provide options like optimise for speed/optimise for quality

P.S. : If you've got what it takes to create this, and you're interested in contract work, please feel free to contact me.

$\endgroup$
3
$\begingroup$

1) Can I just casacade the filters :

input signal -> processed through f1 -> ... -> processed through fn -> output signal ?

Yep, that's how you do it.

2) Given that filters are not perfect, does the order matters ?

Probably not. You're probably working with ≥32-bit floats on a computer processor? So you don't really need to worry about clipping or noise floor issues.

Hardware DSPs are often in fixed-point formats, so they can clip and then it matters because you don't want to boost a frequency to the point of clipping and then attenuate it with a subsequent filter, or cut a frequency down into the noise floor and then boost it back up, dragging the noise up with it.

3) Do you know how I can calculate the transfer curve of the EQ, from each filter's transfer curve ?

If you mean "frequency response", just multiply them together. Or convert them to dB and then add them together. dB is logarithmic, so it converts multiplication into addition.

4) Finally, what kind of filter is best ? From what I read, I think it's better to use high order filters instead of quadratic, so I think I should use Butterworth or Chebyshev filters. Am I right ?

No, you should always use biquad filters and combine them in cascade to make higher-order filters. If you search for "second-order sections" you can find instructions for making higher-order Butterworth and Chebyshev filters this way. This minimizes numerical error from some intermediate numbers being extremely large while others are extremely small.

$\endgroup$
  • $\begingroup$ Biquad isn't linear phase right ? So by cascading the filter, won't I be cascading phase problems too ? $\endgroup$ – Dinaiz Aug 14 '13 at 15:05
  • 1
    $\begingroup$ @Dinaiz: You're working with audio, so you usually don't want linear phase, you want minimum phase. Linear phase would extend ringing both forwards and backwards in time, so you hear the ringing before the event that caused it. Minimum phase only has post-ringing, and so is more natural. I don't believe linear phase is even possible with IIR filters like these; only with FIR filters and the time delay they bring with them. $\endgroup$ – endolith Aug 14 '13 at 16:06
2
$\begingroup$

The answer depends a bit on how fancy you want to get. Let's say you want to do a quick and dirty octave band graphic EQ: The easiest way to do this is to cascade individual filters. Using the "peakingEQ" type described in http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt you can actually get a fairly decent octave band filter with a Q of about 2.8 (2*sqrt(2)). If you want to support 10 bands, you need to cascade 10 biquads. one for each band. Whenever a gain gets updated you then re-calculate the filter coefficients for that particular biquad as described in the cookbook. The nice thing about the structure is that for every band that's "neutral" the amplitude is completely flat and there is no phase distortion. It's also very cheap in terms of CPU.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.