• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

DSP is bad!

How do you do that?
For crossovers that sum to allpass, you can derive the correct allpass representation of the sum mathematically so there's no need to extract the excess phase in the way you describe. Linkwitz-Riley filters actually follow a simple pattern since LR filters are in phase and consist of two cascaded Butterworth filters. For example:
  • LR2 (12dB/oct) is two cascaded 1st-order BW filters. The sum is one 1st-order AP.
  • LR4 (24dB/oct) is two cascaded 2nd-order BW filters (Q=sqrt(1/2)). The sum is one 2nd-order AP with the same Q.
  • LR6 (36dB/oct) is two cascaded 3rd-order BW filters, each of which can be realized as a cascade of one 2nd-order filter with Q=1.0 and one 1st-order filter. The sum can be realized as a cascade of one 2nd-order AP with Q=1.0 and one 1st-order AP.
  • LR8 (48dB/oct) is two cascaded 4th-order BW filters, each of which can be realized as a cascade of two 2nd-order filters where the Q-values are 1/sqrt(2+sqrt(2)) and 1/sqrt(2-sqrt(2)). The sum can be realized as a cascade of two 2nd-order AP filters where the Q-values are (any guesses?) 1/sqrt(2+sqrt(2)) and 1/sqrt(2-sqrt(2)).
I'll stop there as the pattern should be clear enough (and higher orders aren't that often used anyway).

You can also do this for odd-order Butterworth crossovers as they sum to allpass as well, although what you end up with is a bit less obvious at first glance. Here are the first three:
  • BW3 (18dB/oct): one 2nd-order AP with Q=1.0.
  • BW5 (30dB/oct): one 2nd-order AP with Q=2/(1+sqrt(5)).
  • BW7 (42dB/oct): two 2nd-order APs where the Q-values are 1/(2×sin(5pi/14)) and 1/(2×sin(pi/14))
The above is with both the lowpass and highpass sections in positive polarity. If you invert either section, you get a different allpass sum. For example, the BW3 sum with the highpass inverted is a 1st-order AP.

Now, once you have the correct cascade of IIR allpass filters, you need an FIR approximation of it. This can be done by simply truncating the impulse response of the IIR cascade. You can then time-reverse the resulting FIR filter (i.e. literally reverse the order of the taps) and you have your phase linearization filter.
 
Last edited:
Silly me for confusing what struck me as worthwhile improvements in system performance with ruination of the signal. I've only been using DSP in multiple environments for about 6 years, so maybe one day I'll appreciated the errors in judgement I've made thus far.
 
For crossovers that sum to allpass, you can derive the correct allpass representation of the sum mathematically so there's no need to extract the excess phase in the way you describe. Linkwitz-Riley filters actually follow a simple pattern since LR filters are in phase and consist of two cascaded Butterworth filters.

Yeah, I get that ... but once you throw a few PEQ's in there, the calculation is no longer so simple. I don't know if my excess phase extraction method would work, I don't see any reason for it not to.
 
Yeah, I get that ... but once you throw a few PEQ's in there, the calculation is no longer so simple.
What do these additional filters do? If they are for matching a driver's measured magnitude response to some target filter, there is no problem. The driver is substantially minimum phase, so EQing it with minimum phase filters to closely match some target filter also guarantees a close phase match.

Say you're targeting an LR4 highpass response and the driver exhibits a 2nd-order highpass response at a different frequency plus some other response deviations. You might use a shelving filter, a 2nd-order highpass, and some peaking filters to get a good match to the target. If the resulting acoustic magnitude is close to LR4, the acoustic phase will be similarly close to LR4.
 
What do these additional filters do? If they are for matching a driver's measured magnitude response to some target filter, there is no problem. The driver is substantially minimum phase, so EQing it with minimum phase filters to closely match some target filter also guarantees a close phase match.

Say you're targeting an LR4 highpass response and the driver exhibits a 2nd-order highpass response at a different frequency plus some other response deviations. You might use a shelving filter, a 2nd-order highpass, and some peaking filters to get a good match to the target. If the resulting acoustic magnitude is close to LR4, the acoustic phase will be similarly close to LR4.

Thank you, yes that is a fair point.
 
What do these additional filters do? If they are for matching a driver's measured magnitude response to some target filter, there is no problem. The driver is substantially minimum phase, so EQing it with minimum phase filters to closely match some target filter also guarantees a close phase match.

Say you're targeting an LR4 highpass response and the driver exhibits a 2nd-order highpass response at a different frequency plus some other response deviations. You might use a shelving filter, a 2nd-order highpass, and some peaking filters to get a good match to the target. If the resulting acoustic magnitude is close to LR4, the acoustic phase will be similarly close to LR4.
Thank you for your contributions to this and other threads, I have learned a lot. Since we getting into some of the finer details of DSP, the program I use for crossovers has a choice of either "Straight FIR" or "Fast-Fourier FIR". I Google these an it is not clear to me which is preferable to use for crossovers and why. The program runs on a recent PC so processing power is not an issue and there is no video so latency is not a big deal. I would like to use the option that is the most stable and reliable and accurate.... or maybe it doesn't make any difference?
 
the program I use for crossovers has a choice of either "Straight FIR" or "Fast-Fourier FIR". I Google these an it is not clear to me which is preferable to use for crossovers and why.
I'm guessing that "Straight FIR" means what is often called direct convolution or time-domain convolution. "Fast-Fourier FIR" is frequency-domain convolution via the fast Fourier transform (FFT).

The first important point is that if you ignore cumulative round-off error, both methods will give you exactly the same output. They are mathematically equivalent. In practice, there will be some difference due to finite numerical precision.

The computational complexity of direct convolution is O(N²), which means that the required number of arithmetic operations is proportional to the square of the filter length. Frequency-domain convolution is O(N)[1] and a good FFT algorithm is O(N×log(N)), so FFT convolution can be dramatically faster for large N. Cumulative round-off error is proportional to the number of operations, so FFT convolution is also better in this regard for large N.

Direct convolution is typically done continuous for audio and has no added input-output latency[2]. FFT convolution is inherently circular, so continuous convolution must be implemented by splitting the input into blocks and overlapping the outputs (overlap-add or overlap-save methods). For the simplest algorithm where the block length is equal to the filter length, the worst-case added input-output latency is equal to the filter length. However, it's also possible to split the filter into multiple partitions to reduce latency. If the smallest partition is set equal to the input block length (i.e. the length of the blocks read from the input device), there's zero added latency. In cases where the input block length is unknown or variable, it's still possible to achieve zero added latency (albeit somewhat less efficiently) by using a single direct partition along with additional FFT partitions[3].

So, in short, direct convolution ("Straight FIR") is better for very short filters (usually up to around 32 to 64 taps, depending on the hardware and implementation details), while FFT convolution ("Fast-Fourier FIR") is better for longer filters. There's little-to-no practical difference between them besides computational efficiency and possibly latency (if applicable).

[1]: In the frequency domain, convolution is just multiplication.
[2]: By "added latency", I mean latency in addition to the inherent latency of the filter. A linear phase filter, for example, has an inherent latency equal to half its total length.
[3]: I actually came up with this idea independently a few years ago, but later discovered that (not surprisingly) someone else thought of it before me and wrote a paper about it some 25 years prior ;).
 
Back
Top Bottom