Phase-linear bandpass
Hi all,
Doesn't anyone have a phase-linear bandpass patch lying around?
Ideally I would like it to be extremely narrow or perhaps I could chain a few of them to make it extra narrow. I can do this with biquad~ but I need to retain the phase of the original.
I just tried putting a signal through a chain of four biquad pandpass filters at a Q of 5 and subtracting this (using [-~]) from the original. The result was that the bandpassed region (effectively a sine wave extracted from a sawtooth) was completely removed from the original signal.
Assuming that spectroscope isn't lying, wouldn't this indicate that the phase is maintained for this particular input signal at this Q? I can't see how time domain subtraction would work otherwise.
Just to clarify, I'm willing to relax my need for phase linearity if the result is phase-linear for all intents and purposes.
I will be using it to isolate partials for a guitar feedback patch, what happens to the rejected partials is irrelevant as they should be attenuated sufficiently to have a negligible impact.
you can check the phase display option of [filtergraph~] to view the phase spectrum of the selected filter type.
for bandpass filters the phase offset at the center frequency is 0, so you should be fine for frequencies that exactly match the center freq of the bandpass. any frequencies 'around' the center freq will suffer from phase distortion, depending on the q setting, this can be more or less dramatic.
for phase linearity you'd normally use FIR filters. making the impulse response symmetric around the center coefficient is normally all you need to do. then you could use [buffir~] to execute it. but 'extremely narrow' and 'phase linear' are attributes that don't go easily together. for a drastic roll off, the impulse response has to be quite large, probably larger than the 256 samples that buffir~ is able to process. AFAIK typical linear phase Eq plugins like waves linEQ execute the filter in the spectral domain. you can do this in max, but it's complicated, not so easy on the cpu and adds additional latency...
so if the cascaded biquads work for you, then i'd suggest not to worry about phase linearity.
volker.
Thanks Volker, after doing some tests I discovered that there is no phase distortion at the centre frequency like you said.
I never knew about that option in filtergraph, excellent!
Any phase distortion of attenuated frequencies should be fine for my application although I would be concerned with slight movements of the frequency I'm highlighting.
I'm presume that cascading biquad objects is the best bet to keep the area of rough phase linearity wide while attenuating neighbouring frequencies.