3
$\begingroup$

I'm beginning to write a basic "virtual analog" synthesizer and want to implement a lowpass with variable cutoff frequency and resonance. Does anyone have insight into filter types commonly used to mimic the sound of traditional analog gear?

More generally, what are common filters types found in audio applications such as synthesizers, equalizers, etc. I took a basic DSP class many years ago but never gained an appreciation for design choices to consider for audio. I would appreciate any references along these lines.

$\endgroup$
4
$\begingroup$

a lowpass with variable cutoff frequency and resonance.

RBJ has a cookbook on how to do this:

http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt

Here the cutoff frequency is called w0, and the resonance is called Q:

LPF:        H(s) = 1 / (s^2 + s/Q + 1)

            b0 =  (1 - cos(w0))/2
            b1 =   1 - cos(w0)
            b2 =  (1 - cos(w0))/2
            a0 =   1 + alpha
            a1 =  -2*cos(w0)
            a2 =   1 - alpha

If you want to vary these parameters continuously while passing signal, you are not supposed to use biquads (because updating the coefficients causes glitches?) and you should use state-variable filters instead:

http://www.earlevel.com/main/2003/03/02/the-digital-state-variable-filter/

This is also a 2nd-order lowpass with variable Q.

Does anyone have insight into filter types commonly used to mimic the sound of traditional analog gear?

Generally any filter transformed to a digital IIR using the bilinear transform is an "analog-like" filter. Bessel is an exception because the important property of a Bessel filter is its group delay, which is not preserved by the bilinear transform. Bilinear transform attempts to preserve the frequency response primarily.

$\endgroup$
  • 1
    $\begingroup$ but endo, if the OP wants to wildly modulate the resonant frequency and/or resonance (Q), they can use the Cookbook to get the Direct Form coefficients, but they should probably implement the filters with Lattice or Normalized Ladder. (or some State Variable filter a.la. Simper or Chamberlin.) my only bone to pick with Andrew Simper is that, for the same order of filter, the filter architecture and the desired frequency response are independent issues. i.e. if you want your 2nd-order SVF or Lattice to look like a Cookbook DF1, it's always doable. but once you modulate it, that's different. $\endgroup$ – robert bristow-johnson Mar 22 '15 at 21:28
  • $\begingroup$ @robertbristow-johnson Ok. You could add that as a separate answer since I'm not knowledgeable about changing the coefficients on the fly. $\endgroup$ – endolith Mar 22 '15 at 22:08
  • 1
    $\begingroup$ endo, i remember reading some paper done a while ago by Jean Laroche, but i don't remember the detail. the take-away i get from it is, if you wanna modulate the hell outa the coefficients, you might wanna use a Lattice or Normalized Ladder (i think they work as well or better the either Andrew Simper's or Hal Chamberlin's SVF). converting coefficients from Direct Form to Lattice ain't too awful bad. if fact one of them (i think $k_2$) depends solely on the resonant frequency $\omega_0$. i think it's $$ k_2 = \cos(\omega_0) $$ which suffers from the "cosine problem" for low $w_0$. $\endgroup$ – robert bristow-johnson Mar 23 '15 at 0:40
  • $\begingroup$ @endolith Thank you, it looks like the music-dsp mailing list has a lot of great information. And your links give me something I can begin playing around with. Thanks! $\endgroup$ – dls Mar 23 '15 at 4:03
  • $\begingroup$ @robertbristow-johnson Your comments have a lot of good information, but unfortunately I never learned about the various forms. I will take a look at those. Are you talking about the article "On the Stability of Time-Varying Recursive Filters"? It may be helpful to work through this even if I don't use anything from it. Thanks! $\endgroup$ – dls Mar 23 '15 at 4:09

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.