3rd order all-pass

Romain Soufflet's icon

Hi,

I need to create a 3rd order all-pass (with cutoff frequency and quality factor as inputs).
I think it can be done with gen~ object like in this topic regarding 1rst order all-pass: https://cycling74.com/forums/1st-order-allpass
The problem is I don't have the difference equation nor the block diagram. The only lead I have is this website: https://thewolfsound.com/allpass-filter/
Do have any idea?
Thank you,

Romain

Dimitri Aatos's icon

You can intuitively derive the diagram of the 3rd order filter by finding how to go from the 1st order filter to the 2nd order filter, and do the process once more. I'm not sure about the coefficients, there should be a pattern there as well.

black: first order
black + red: second order
black + red + green: third order

Romain Soufflet's icon

Hello everyone,

Thank you very much for the block diagram @Dimitri Aatos.

I finally found the way to obtain 3rd order coefficient functions. You must start from the analog equation, develop this one with the bilinear transform to get the digital form of the equation:

Digital and analog all-pass transfer functions

Then you have the a1, a2, a3 coefficients only dependent on cutoff frequency, quality factor, and sampling frequency.

I am disappointed because 3rd order gives the exact same result as one 1st order and one 2nd order filter in cascade, so the steepness of the phase response cannot be as straight as a 2nd order all-pass (as 1st order all-pass does not have any quality factor so a smooth slope).

1rst order all-pass

2nd order all-pass, Q=10

3rd order all-pass, Q=10

1rst order all-pass + 2nd order all-pass, Q=10

It might exist another analog transfer function for 3rd order all-pass which allows to get a straighter phase slope… ?

You can still find the patch attached:

all-pass_tests.zip
application/x-zip-compressed 9.69 KB

Romain

Roman Thilenius's icon

maybe that is not exactly what you need here, but you can of course also just cascade 1 pole filters, that should even be more precise.