• 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!

New: Hang Loose DSP Processor

I missed that part. It is fiendishly difficult to design a linear phase IIR filter. I forget what the method is called, something about reversed subtractive filtering. But it will have the same problem as linear-phase FIR filters. Linphase filters are acausal, meaning it can act on past, present, and future inputs (in contrast, a causal filter can only act on present and past inputs). The "future" input does not imply time travel, it only knows what the future is because the future has been delayed by the filter ;) If you want an acausal filter, you MUST have a delay.
there are some methods that were shared on diyaudio for calculating matched delay subtractive crossover which I added to my filter editor for jriver. While there is some latency involved, it's nowhere near that of the linear phase equivalent and, at least here, is fine for live video use. I definitely wouldn't want to try to roll this by hand, for example this is the graph for my setup using MDS filters (if you zoom in then you can see the delays involved which scale with the xo frequency)

1775243255948.png
 
Thanks guys.
My interest in filters encompasses both DRC, plus the sort of phase response correction that Neumann and Genelec achieve with their more recent speakers.
It's difficult to explain succinctly, but my target is to achieve flat group delay to within +/-0.5ms, or linear phase response within +/-45 deg, both above 200Hz.
Together with a decent flat FR, that seems to be the key to good time domain response. Genelec have a switchable "Extended Phase Linearity" function that achieves this.
I presume they use linear phase FIR filters to compensate for the crossover phase distortion, and they typically add 4ms delay to the processing.
I'm sure it's possible and beneficial to extend the phase linearization to lower frequencies, but that will surely increase the delay much more.
Genelec charted the phase and group delay of their new 8380A with and without Extended Phase Linearity, and their "One" series speakers do the same.
I hope to do the same with passive speakers, in addition to compensating for room effects.

1775255146436.png


Here's the main point. I'm not concerned so much with what sort of filters are needed, just as long as they can apply phase compensation.
And if they do, it must be inevitable that they apply time delay to the high frequencies?
 
Geez @3ll3d00d talk about complex. I wouldn't have the brains to come up with something like that. I think that Charlie Laub was working on something similar. Anyway hats off to both of you!

I think it may be possible to obtain less latency with linphase FIR if we manually move the position of the impulse. It has been on my to-do list for some time to experiment with it. What I would do is examine the impulse and step response, see where the acausal part starts, then move the impulse by the maximum possible amount. Then apply the same with all the filters.

Here's the main point. I'm not concerned so much with what sort of filters are needed, just as long as they can apply phase compensation.
And if they do, it must be inevitable that they apply time delay to the high frequencies?

If you examine the group delay graph, you will find that all speakers and drivers have the same pattern: less GD for high frequencies, more GD for low frequencies. It's simply the minimum-phase nature of drivers. Therefore, if you want to correct GD, it will always involve delaying high freqs by some amount.
 
Geez @3ll3d00d talk about complex. I wouldn't have the brains to come up with something like that. I think that Charlie Laub was working on something similar. Anyway hats off to both of you!
fortunately someone else over on diya came up with the approach :) I just had to work out how to translate it to a working n way setup in jriver using the filters it has available (they could make that app so much better for this purpose if they had the inclination to do so but ....).

In the context of this thread, I guess the point is that it's not so hard, if you have full control over the software stack, to provide such a thing as a choice to the end user just like offering bessel or LR or whatever is a selection in a dropdown box.
 
If you examine the group delay graph, you will find that all speakers and drivers have the same pattern: less GD for high frequencies, more GD for low frequencies. It's simply the minimum-phase nature of drivers. Therefore, if you want to correct GD, it will always involve delaying high freqs by some amount.
To-the-best-of-my-knowledge / limit-of-my-understanding, a speaker driver is a dynamic transducer with the characteristics of a bandwidth-limited filter.
Within the pass-band, everything works quite well, with reasonably flat response - BOTH amplitude vs freq AND phase vs freq.
At the top end, the wavelength gets smaller and approaches the size of the driver, which starts beaming and breaking up.
At the bottom end, set by the system resonance, the acoustic suspension resistance dominates the inertia of the driver mass, and the acoustic output rolls off.
In this condition it transitions from being a dynamic transducer, to being a static transducer.
The resistance to motion is now in phase with the displacement, rather than with the acceleration, so there's a big phase shift there (when you drop below the pass band).
Therefore there's increased GD at low frequencies as mentioned above.
The tweeter (and midrange) will ideally work within their passband, so shouldn't have too much phase variation BUT when they hand over to another drive unit, there's an additional phase discontinuity, simply due to the crossover. A 3-way speaker has an additional x-over and phase delay. That's what I'm most focussed on, because of this:
Thanks to Mitch, here's an ideal step response for a loudspeaker with a finite bandwidth:
1775323450337.png

Most speakers get nowhere this. There's not much data around, but I found these phase and step measurements for the complex 3-way Neumann KH420:
1775323476619.png
1775323492508.png

I knew that electrostatics, like this Quad ESL-2804 (1), had good time domain / step response, and I figured it was because of their light diaphragms. However, single moving-coil drive unit speakers like the Fujitsu Ten Eclipse TD712z (2) and the Meyer Sound MM-4XP (3) have similar step response, showing what the absence of a crossover can do:
1775323523998.png
1775323558256.png
1775323585216.png

A German magazine called Sound and Recording used to take thorough studio monitor speaker measurements, including amplitude, phase and step response. I've got lots of links to them, but they seem to have gone, and been replaced by a magazine that only focusses on keyboards, and the test results have been lost. I saved a few useful charts, like the KH420 test above, and the Neumann KH150 (1) and KH120ii (2) below. These are digital active speakers with phase compensation that keeps the midrange flat, from around 200Hz upwards. The effect is to make the step response close to ideal (see the inset charts), and similar to what Mitch achieves with Audiolense (3), or Trinnov with Optimiser (4).
1775323674828.png
1775323695322.png
1775323736653.png
1775324056058.png


This is what I'm after - a fairly modest level of phase correction in the midrange that will overcome what a crossover does to any two or three way speaker, and allow it to reproduce steps, squares and impulses properly. It sounds like the obvious way to do that is with a linear phase FIR filter - and accept the inevitable (hopefully modest) time delay.
 
Last edited:
To-the-best-of-my-knowledge / limit-of-my-understanding, a speaker driver is a dynamic transducer with the characteristics of a bandwidth-limited filter.
Within the pass-band, everything works quite well, with reasonably flat response - BOTH amplitude vs freq AND phase vs freq.
At the top end, the wavelength gets smaller and approaches the size of the driver, which starts beaming and breaking up.
At the bottom end, set by the system resonance, the acoustic suspension resistance dominates the inertia of the driver mass, and the acoustic output rolls off.
In this condition it transitions from being a dynamic transducer, to being a static transducer.
The resistance to motion is now in phase with the displacement, rather than with the acceleration, so there's a big phase shift there (when you drop below the pass band).
Therefore there's increased GD at low frequencies as mentioned above.
The tweeter (and midrange) will ideally work within their passband, so shouldn't have too much phase variation BUT when they hand over to another drive unit, there's an additional phase discontinuity, simply due to the crossover. A 3-way speaker has an additional x-over and phase delay. That's what I'm most focussed on, because of this:
Thanks to Mitch, here's an ideal step response for a loudspeaker with a finite bandwidth:
View attachment 522387
Most speakers get nowhere this. There's not much data around, but I found these phase and step measurements for the complex 3-way Neumann KH420:
View attachment 522388 View attachment 522389
I knew that electrostatics, like this Quad ESL-2804, had good time domain / step response, and I figured it was because of their light diaphragms:
View attachment 522390
However, single drive unit speakers like the Fujitsu Ten Eclipse TD712z and the Meyer Sound MM-4XP have similar step response, showing the effect of the crossover:
View attachment 522391 View attachment 522393
A German magazine called Sound and Recording used to take thorough studio monitor speaker measurements, including amplitude, phase and step response. I've got lots of links to them, but they seem to have gone, and been replaced by a magazine that only focusses on keyboards, and the test results have been lost. I saved a few useful charts, like the KH420 test above, and the Neumann KH150 (1) and KH120ii (2) below. These are digital active speakers with phase compensation that keeps the midrange flat, from around 200Hz upwards. The effect is to make the step response close to ideal, and similar to what Mitch achieves with Audiolense (3), or Trinnov with Optimiser (4).
View attachment 522394 View attachment 522395 View attachment 522396 View attachment 522397

This is what I'm after - a fairly modest level of phase correction in the midrange that will overcome what a crossover does to any two or three way speaker, and allow it to reproduce steps, squares and impulses properly. It sounds like the obvious way to do that is with a linear phase FIR filter - and accept the inevitable (hopefully modest) time delay.

I don't think you'd be able to get a "modest" time delay or rather overall latency if you consider the low bass. If it's just the mid-range maybe 1 to 4ms tops with an FIR.
 
there are some methods that were shared on diyaudio for calculating matched delay subtractive crossover which I added to my filter editor for jriver. While there is some latency involved, it's nowhere near that of the linear phase equivalent and, at least here, is fine for live video use. I definitely wouldn't want to try to roll this by hand, for example this is the graph for my setup using MDS filters (if you zoom in then you can see the delays involved which scale with the xo frequency)

View attachment 522146

How many milliseconds of time were you able to cut back compared to if you were to use a conventional FIR? Even just an approximate is okay.
 
How many milliseconds of time were you able to cut back compared to if you were to use a conventional FIR? Even just an approximate is okay.
you can play around with the app to get an idea but here's an example, a simple 4th order 3 way at 100 & 2kHz gives a pretty small delay (~12ms). The delays get larger as the order goes up or the corner frequency goes down.

1775332649349.png



1775333268176.png
 
Last edited:
a simple 4th order 3 way at 100 & 2kHz gives a pretty small delay (~12ms). The delays get larger as the order goes up or the corner frequency goes down.

If one were to linearize the phase after-the-fact (post minimum phase crossovers), it looks like an all pass inverse phase filter (with centering at 12ms) could still perform an approximate correction with some overshoot/ripple. This is not ideally the best way to do it, I would think, but still kind of works:

magnitude.png phase.png gd.png
 

Attachments

  • rephase.png
    rephase.png
    67.7 KB · Views: 37
I think it may be possible to obtain less latency with linphase FIR if we manually move the position of the impulse. It has been on my to-do list for some time to experiment with it. What I would do is examine the impulse and step response, see where the acausal part starts, then move the impulse by the maximum possible amount. Then apply the same with all the filters.
No that won't work, at least not if you want a linear phase filter. To achieve linear phase the impulse response must be symmetric or anti-symmetric. If you shift the center of the filter to the left it will no longer be symmetric and thus its phase response will no longer be linear. You could truncate both sides to keep it symmetric and thus maintain the linear phase, but that would just be a poor way of designing a shorter filter.

But I think there's some confusion about linear phase and minimum phase here (along with mixed phase, excess phase, etc.). To understand them you need to think in terms of group delay, which is the delay a filter has at a given frequency. If a filter doesn't have constant group delay across all frequencies it will introduce a distortion in the output because some frequencies will arrive later than others.

A minimum phase filter has the smallest group delay possible (lowest overall latency) for a linear time invariant filter with a given magnitude response, but it generally will not have a constant group delay and thus will distort the signal.

To avoid this distortion one needs a filter that has constant group delay across all frequencies (well, all whose magnitude response is non-zero). Group delay is related to the phase response of the filter. Specifically it is the negative derivative of of the filter phase response with respect to frequency. This tells us that to achieve constant group delay the phase response must be linear. (Linear because a constant derivative means a constant slope and thus the phase response vs frequency is a straight line whose negative slope is equal to the filter's delay.) This is what makes linear phase filters desirable. The goal is all frequencies arriving at the same time. Linear phase is the requirement for that to happen.

The real power of FIR filters over IIR filters is not that they can be linear phase, but that you can control the phase response in general. Linear phase is one choice you can make, and it is a good choice if you can accept the latency they require and you are not trying to correct other parts of the system which are not linear phase. A minimum phase design is another choice you can make, chosen when latency must be minimized. (The disadvantage of FIR over IIR is that computational costs are higher to achieve the same filter response.)

I think the confusion is that if you're designing an entire system then it makes some sense to view minimum phase and linear phase as the two extremes of delay, because why would you ever add more delay than required to reach linear phase? (Set aside the obvious case where you truly want a delay line such as syncing audio and video which you can achieve with zeros at the start of of your filter.) All you would be doing is creating a distorting filter with a lot of unnecessary latency. In this context one talks about minimum phase, linear phase, and mixed phase filters. Where mixed phase is any filter which is a compromise between the shortest latency of the minimum phase filter and the distortionless response of the linear phase filter; a filter with less distortion than the mininmum phase response and less total latency than the linear phase response.

Your moving the linear phase filter to the left is one example of designing a mixed-phase filter in this context. You will have less delay than the linear phase filter, but because the phase will no longer be linear you will be introducing distortion by non-constant group delay.

But if you're using FIR filters to fix the group delay spread of an existing non-linear phase system one would not choose a linear phase filter nor a minimum phase filter. Rather you would create a filter whose group delay delayed the earlier arriving frequencies to arrive at the same time as the latest arriving frequency which would make the overall system have constant group delay which equates to linear phase. Of course this requires the overall system to have a latency greater than or equal to the largest group delay (most delayed frequency) of the uncorrected system. That might be unacceptable in which case you make a compromise such as delaying all frequencies whose latency is below an acceptable value to have that value while adding minimal additional delay to those frequencies whose group delay already exceeds the acceptable value.
 
Last edited:
No that won't work, at least not if you want a linear phase filter. To achieve linear phase the impulse response must be symmetric or anti-symmetric. If you shift the center of the filter to the left it will no longer be symmetric and thus its phase response will no longer be linear. You could truncate both sides to keep it symmetric and thus maintain the linear phase, but that would just be a poor way of designing a shorter filter.

But I think there's some confusion about linear phase and minimum phase here (along with mixed phase, excess phase, etc.). To understand them you need to think in terms of group delay, which is the delay a filter has at a given frequency. If a filter doesn't have constant group delay across all frequencies it will introduce a distortion in the output because some frequencies will arrive later than others.

A minimum phase filter has the smallest group delay possible (lowest overall latency) for a linear time invariant filter with a given magnitude response, but it generally will not have a constant group delay and thus will distort the signal.

To avoid this distortion one needs a filter that has constant group delay across all frequencies (well, all whose magnitude response is non-zero). Group delay is related to the phase response of the filter. Specifically it is the negative derivative of of the filter phase response with respect to frequency. This tells us that to achieve constant group delay the phase response must be linear. (Linear because a constant derivative means a constant slope and thus the phase response vs frequency is a straight line whose negative slope is equal to the filter's delay.) This is what makes linear phase filters desirable. The goal is all frequencies arriving at the same time. Linear phase is the requirement for that to happen.

The real power of FIR filters over IIR filters is not that they can be linear phase, but that you can control the phase response in general. Linear phase is one choice you can make, and it is a good choice if you can accept the latency they require and you are not trying to correct other parts of the system which are not linear phase. A minimum phase design is another choice you can make, chosen when latency must be minimized. (The disadvantage of FIR over IIR is that computational costs are higher to achieve the same filter response.)

I think the confusion is that if you're designing an entire system then it makes some sense to view minimum phase and linear phase as the two extremes of delay, because why would you ever add more delay than required to reach linear phase? (Set aside the obvious case where you truly want a delay line such as syncing audio and video which you can achieve with zeros at the start of of your filter.) All you would be doing is creating a distorting filter with a lot of unnecessary latency. In this context one talks about minimum phase, linear phase, and mixed phase filters. Where mixed phase is any filter which is a compromise between the shortest latency of the minimum phase filter and the distortionless response of the linear phase filter; a filter with less distortion than the mininmum phase response and less total latency than the linear phase response.

Your moving the linear phase filter to the left is one example of designing a mixed-phase filter in this context. You will have less delay than the linear phase filter, but because the phase will no longer be linear you will be introducing distortion by non-constant group delay.

But if you're using FIR filters to fix the group delay spread of an existing non-linear phase system one would not choose a linear phase filter nor a minimum phase filter. Rather you would create a filter whose group delay delayed the earlier arriving frequencies to arrive at the same time as the latest arriving frequency which would make the overall system have constant group delay which equates to linear phase. Of course this requires the overall system to have a latency greater than or equal to the largest group delay (most delayed frequency) of the uncorrected system. That might be unacceptable in which case you make a compromise such as delaying all frequencies whose latency is below an acceptable value to have that value while adding minimal additional delay to those frequencies whose group delay already exceeds the acceptable value.
Thank you, very clear explanation of a complex subject. How would a "Linearized IIR" crossover filter fit into all of this?
 
If one were to linearize the phase after-the-fact (post minimum phase crossovers), it looks like an all pass inverse phase filter (with centering at 12ms) could still perform an approximate correction with some overshoot/ripple. This is not ideally the best way to do it, I would think, but still kind of works:

View attachment 522439 View attachment 522440 View attachment 522441
yes it can be done with an FIR filter on top but this is IIR only using some biquads and some delays so that can have some significant advantages
 
This is a great thread, I appreciate everyone's input.
It seems to me that phase correction amounting to 4ms group delay can achieve acceptable phase linearity down to around 200Hz. Good enough for me for now.
It's conservative, but lets assume that 22ms audio lag is acceptable, so what's the lowest frequency that we could stay phase linear down to?
It will depend on the speaker, but there are several useful charts by Neumann and Genelec that show GD going up to about 20ms at around 30 to 40Hz.
Does that mean it's possible to maintain phase correction down to that level?
 
It will depend on the speaker, but there are several useful charts by Neumann and Genelec that show GD going up to about 20ms at around 30 to 40Hz.
Does that mean it's possible to maintain phase correction down to that level?

Yes, of course it's possible. But whether it's a good idea is another story.

First, the rising group delay at low freqs is due to the minimum-phase nature of the loudspeaker. If you study that GD plot closely and compare it to the frequency response, you will see that the reason the GD is rising is because the SPL is falling. In order to fix this, you need to equalize that speaker to flat down to 20Hz. Now, ANY speaker can be equalized to flat down to 20Hz, even tiny bookshelf speakers the size of a drinking mug. The only problem is that you lose 50-60dB of headroom and you get a tonne of bass distortion. Your speakers will be flat to 20Hz, but they will also be so quiet that you can't hear them.

OK, so let's forget minimum-phase equalization and use linear-phase. We can manipulate phase independent of the frequency response right? So why not use that to flatten GD? Well, once again you can. But you will get a lot of pre-ringing, and THAT will sound extremely objectionable.

I suggest you create a loudspeaker simulation in REW and play with it. Use the EQ tool and create a bookshelf speaker with a bandpass of 100Hz - 20kHz, 2nd order Butterworth, then "generate measurement from filter". Look at the group delay, then try to EQ it down to flat and see what happens.

You have to ask yourself whether it's worth it. 20ms of group delay at 30-40Hz is INAUDIBLE, according to research by Liski, Makivirta, et al. On the other hand, attempting to fix it will create real problems.

And this is before we even put your perfectly equalized loudspeaker into a room. The room itself will mess up your perfect phase and group delay response.

All this is a very long way of saying: don't bother. Don't introduce serious problems to fix an inaudible problem.
 
yes it can be done with an FIR filter on top but this is IIR only using some biquads and some delays so that can have some significant advantages

Indeed, I do acknowledge that... it's just that I thought this technique would surely lower latency a bit more -- let's say sub 10 ms in the sub/low bass. That's just wishful/magical thinking on my part. Heheh
 
You have to ask yourself whether it's worth it. 20ms of group delay at 30-40Hz is INAUDIBLE, according to research by Liski, Makivirta, et al. On the other hand, attempting to fix it will create real problems.

And so GD reduction seems to me ultimately secondary to whether one can gain a better summed response around the crossovers. Having independent control of the phase often can lead to better gain. One just needs to double check that you don't introduce unwanted distortion (the thing that you can actually hear as sounding bad and not just measure by zooming in on a scope).
 
Noob here, but from lots of reading I've decided a Light Touch on the DSP is my guiding principle.

I plan to interfere with the signals ONLY to the extent I CAN HEAR a significant improvement

proven by blind SPL matched ABX testing using F&F for statistical significance, whenever possible.
 
Noob here, but from lots of reading I've decided a Light Touch on the DSP is my guiding principle.

I plan to interfere with the signals ONLY to the extent I CAN HEAR a significant improvement

proven by blind SPL matched ABX testing using F&F for statistical significance, whenever possible.
The safest place to start is using DSP to reduce room mode peaks below the Schroeder frequency of your room with PEQ filters after carefully placing your speakers and listening position to minimize room issues. This will get you most of the potential DSP benefits and will not cause any troubles.
 
The safest place to start is using DSP to...
I thought FR EQ could only go so far with room effects?

I was hoping to tame room modes more with free placement of multiple mono subs, iterating REW testing. Do those need to be BRuTeS (Bone Rattling fUll-size TruE Sub)? or would smaller ones be enough?

I'm hoping to still make the co-located stereo subs be dominant aurally.

I'm thinking, shortening relative delays between my main front L/R and the various subs would be the most likely "need DSP" trigger.
 
Back
Top Bottom