Is there any rule of thumb for choosing MUSIC FILTER algorithm?

I mean, I know FIR, IIR, etc. But I am not sure which exact algorithm I should use.

Anyone knows, say which filter algorithm SuperCollider RLPF is using?

Thanks in advance.

“Which filter do I use” a pretty deep question!

LPF, BPF, HPF, RLPF, and most of the BEQSuite filters are direct implementations of the digital biquad filters described in the EQ Cookbook by Robert Bristow-Johnson. All of them are IIR linear filters formed by digitizing standard two-pole analog filters using the Bilinear Transform with frequency warping. The digital filter topology is Transposed Direct Form II.

For audio, RLPF is a somewhat passé algorithm since it has weird artifacts when rapidly modulated. In modern music DSP, the gold standard for a stock EQ filter is the Trapezoidal State Variable Filter. (Beware, the SVF in sc3-plugins is a Chamberlin SVF, which has inferior stability properties.)

For musical filters, analog synths have defined what people consider a “good” filter, so virtual analog methods are the algorithms with the most prestige. These can be as rudimentary as adding saturators in the feedback loops of an existing digital filter, or going to the lengths of analyzing an analog circuit and numerically solving the differential equations. There’s no textbook algorithm to design a good-sounding VA filter. The only way is to read every paper you can get your hands on and start experimenting.

FIR filters are generally rare in music DSP, except in linear phase mastering EQs and sample rate converters. They are ubiquitous in more engineer-y areas like telecommunications and DAC/ADC design.

edit: My bad, should have checked more closely. RLPF is actually not in the EQ cookbook, but it is derived with the same method as the cookbook filters, starting with the classic two-pole lowpass.

4 Likes

interesting! are there any UGen implementations of the Trapezoidal SVF out there that anyone knows of?

1 Like

I’m making a tiny application with a GUI and using the filters as I see on textbooks like the Cookbook. It is clear this is just trying to have a working program, using the simplest solutions.

something likle

lowPassFilter :: Float -> Float -> IIRParams
lowPassFilter freq q =
    IIRParams
        { b0
        , b1 = 1 - cos w0
        , b2 = b0
        , a0 = 1 + α
        , a1 = -2 * cos w0
        , a2 = 1 - α
        }
  where
    b0 = (1 - cos w0) / 2
    w0 = calcW0 freq
    α = calcAQ w0 q

But, now tell me, is it true all good information about filters is dispersed everywhere in papers? Is there a place where we get all the information, but also get music insights like you usually share here? Show us the way!

1 Like