Interesting algorithm. I do wonder, though, what is the necessity of maximally-flat delay at DC. Or is that just a noteworthy "mathematical thing"? It does say, "Only known closed-form case for allpass interpolators of arbitrary order".I did something similar... a bit more, ahem, recently (!) using Thiran All-Pass filters.
As for "recently", well, I've been at this for a long time! 🙂
I would say that flat group delay from DC to very low frequencies is usually almost automatically achieved by nature.Interesting algorithm. I do wonder, though, what is the necessity of maximally-flat delay at DC. Or is that just a noteworthy "mathematical thing"? It does say, "Only known closed-form case for allpass interpolators of arbitrary order".
But absolute group-delay deviations have less influence on the signal shape at lower frequencies than at higher frequencies. In other words; 1 ms of GD nonlinearity is almost nothing at 20 Hz but very huuuuuge at 20 kHz. But maybe I didn't get right what you try to tell us.
And I once read that there was no closed form solution for the calculation of allpass phase EQs. This would always ask for some some kind of approximation. But I may not be up to date probably. Apart form the fact that I am not a maths hero.
Regards
Charles
No, you got it. I was just curious about the "maximally-flat delay at DC" constraint. It seems unnecessary in the real world, even though it's necessary for that particular algorithm.But maybe I didn't get right what you try to tell us.
It should also be mentioned that we're talking about two different things, here. The Thiran algorithm mentioned by @CharlieLaub creates an allpass filter that approximates constant delay across all frequencies. That is what Don Keele needed in the ASR post that I cited, but it's not what is needed for phase compensation. My FDLS_allpass algorithm tries to approximate an arbitrary allpass phase response, which won't be constant-delay in most cases. But it might be just what is needed to flatten or linearize the delay of a loudspeaker.
I have to admit that FDLS_allpass is not easy to use for this. It takes a desired phase response as its input, not a desired group delay. So the operator needs to do quite a bit of arithmetic up-front, in order to specify the desired phase response which, when combined with the existing phase response, results in constant delay.
There are some plots on SL's web site of loudspeaker GD. It's why I am choosing the type of GD curves that I am fitting. See:
https://www.linkwitzlab.com/frontiers.htm#F
Near the bottom of that section, the figures labeled (f) and (g) in pencil.
Another source of plots is Erinsaudiocorner loudspeaker reviews. These measurements are a bit noisy, however.
https://www.linkwitzlab.com/frontiers.htm#F
Near the bottom of that section, the figures labeled (f) and (g) in pencil.
Another source of plots is Erinsaudiocorner loudspeaker reviews. These measurements are a bit noisy, however.
Hmm ... I'm a bit surprised to have to say that I agree with much of what Mr. Linkwitz said there. (He and I once butted-heads over the audibility of phase response.) For the very same reasons that he cites between his Figures f and g, I question the necessity of extending linear-phase compensation to low frequencies. Add to that the possibility of large pre-ring at low frequencies, and all I can do is urge caution.Near the bottom of that section, the figures labeled (f) and (g) in pencil.
The natural world is full of minimum-phase highpass systems -- any system that cannot maintain DC is, by definition, highpass. And all such highpass systems necessarily increase group delay at low frequencies. So I'll assert, without proof or evidence, that we have evolved to find it unobjectionable. YMMV.
The first section seem very much to be a word salad text generated with ChatGPT and then put into a voice synthesizer.
He wrote the text himself, but yes, he reproduced the text with a speech synthesizer because later in the video he already says with his accent that he used a speech synthesizer.The first section seem very much to be a word salad text generated with ChatGPT and then put into a voice synthesizer.
The video is not for beginners. A lot of manipulations need to be done in REW, but he did not do the most important thing at the end, he did not double-check the result with a microphone.
I just read through SL's writings, as refreshment...
https://www.linkwitzlab.com/frontiers.htm#F
https://www.linkwitzlab.com/Removed pages/x-phs-dist.htm
Psychoacoustics is here more important thant mathematics or phase or spl response itself. High GD affects most transients of bass, which are hearable and localizable.
Also Griesinger has written about localization of transients http://www.davidgriesinger.com/
https://www.linkwitzlab.com/frontiers.htm#F
https://www.linkwitzlab.com/Removed pages/x-phs-dist.htm
Psychoacoustics is here more important thant mathematics or phase or spl response itself. High GD affects most transients of bass, which are hearable and localizable.
Also Griesinger has written about localization of transients http://www.davidgriesinger.com/
Thanks for sharing the links. I will have to take some time to read through Griesinger's web site.
Note that Linkwitz said this:
https://acris.aalto.fi/ws/portalfiles/portal/66449704/Audibility_of_Group_Delay_Equalization.pdf
So while "normal" amounts of group delay from e.g. loudspeaker is typically not causing any problems in terms of what you can hear, there are some instances where correcting (reducing) the group delay response will improve the sound quality in various ways.
Note that Linkwitz said this:
What he is remarking about is that even waveforms that seem quite distorted in the time domain can sound identical to the undistorted version (when the source of distortion is group delay only). The threshold of when waveform distortion becomes just audible has been pretty well studied now. The first section of this paper and especially Figure 1 is a great review of that:The waveforms of A, B and C above are quite different and it would not be unreasonable to expect that they sound different. Yet, I have not found a signal for which I can hear a difference. This seems to confirm Ohm's acoustic law that we do not hear waveform distortion.
https://acris.aalto.fi/ws/portalfiles/portal/66449704/Audibility_of_Group_Delay_Equalization.pdf
So while "normal" amounts of group delay from e.g. loudspeaker is typically not causing any problems in terms of what you can hear, there are some instances where correcting (reducing) the group delay response will improve the sound quality in various ways.
One thing to remember is the basic difference of transient and steady state sound pressure/wave/energy.
Room measurements with eg. REW are mostly steady state, and reprsesent what we hear also at an orchestra hall (without any electronics)
In nearfield or normal living room or at small chamber hall listening to a classical or jazz band (without any electronics) we can hear direct transient bass impulses arriving before reverberant energy peaks. Ref. Griesinger's website
Having lived all my life with piano, violin, brass, guitar etc. sound at home and venues, I kinda know how difficult it is to record these and preserve authentic sound in reproduction. Nearfield miking of eg. kick drum or acoustic guitar will sound different from live... Then add hall sound if using other recording mic setups... https://www.soundonsound.com/microphones-miking?f[0]=node%3Afield_section:6971&f[1]=node%3Afield_subject:7052
I must confess that:
Babbling about authentic sounding transients from speakers is just sideline nitpicking of minor differences, much less important than good spl balance, low distortion, stereo imaging and center solidity/symmetry or reasonable room RT 😎 But I'd like to know why I prefer sealed big box/driver bass more than reflexes... or dislike subwoofers with LR4 xo at 80Hz without dsp and delayed mains.
Room measurements with eg. REW are mostly steady state, and reprsesent what we hear also at an orchestra hall (without any electronics)
In nearfield or normal living room or at small chamber hall listening to a classical or jazz band (without any electronics) we can hear direct transient bass impulses arriving before reverberant energy peaks. Ref. Griesinger's website
Having lived all my life with piano, violin, brass, guitar etc. sound at home and venues, I kinda know how difficult it is to record these and preserve authentic sound in reproduction. Nearfield miking of eg. kick drum or acoustic guitar will sound different from live... Then add hall sound if using other recording mic setups... https://www.soundonsound.com/microphones-miking?f[0]=node%3Afield_section:6971&f[1]=node%3Afield_subject:7052
I must confess that:
Babbling about authentic sounding transients from speakers is just sideline nitpicking of minor differences, much less important than good spl balance, low distortion, stereo imaging and center solidity/symmetry or reasonable room RT 😎 But I'd like to know why I prefer sealed big box/driver bass more than reflexes... or dislike subwoofers with LR4 xo at 80Hz without dsp and delayed mains.
Last edited:
I have a question for the FIR users out there who are reading this thread:
If you wanted to make a 4th order linear phase highpass filter, or group delay correction filter for the same, with a pole frequency of 30Hz what sort of latency would you expect from the kernel? Can you estimate how many taps are required? I am guessing you would need around 8000-1000 taps for sufficient resolution even if you are only running at 44.1kHz.
The reason I ask is that, to a first approximation, a vented box is like a 4th order Butterworth response (of course it would depend on the exact alignment used, etc.). I could completely flatten such a group delay using two second order reverse-IIR allpass filters but because of the low pole frequency (e.g. 30 Hz) the latency produced is around 170msec.
If you wanted to make a 4th order linear phase highpass filter, or group delay correction filter for the same, with a pole frequency of 30Hz what sort of latency would you expect from the kernel? Can you estimate how many taps are required? I am guessing you would need around 8000-1000 taps for sufficient resolution even if you are only running at 44.1kHz.
The reason I ask is that, to a first approximation, a vented box is like a 4th order Butterworth response (of course it would depend on the exact alignment used, etc.). I could completely flatten such a group delay using two second order reverse-IIR allpass filters but because of the low pole frequency (e.g. 30 Hz) the latency produced is around 170msec.
Using rePhase with optimization I could quickly arrive at fair solution using 2048 samples @ 44.1kHz (46ms intrinsic delay) to compensate a 4th order system highpass function:I have a question for the FIR users out there who are reading this thread:
If you wanted to make a 4th order linear phase highpass filter, or group delay correction filter for the same, with a pole frequency of 30Hz what sort of latency would you expect from the kernel? Can you estimate how many taps are required? I am guessing you would need around 8000-1000 taps for sufficient resolution even if you are only running at 44.1kHz.
And with 3072 taps the result is completely free of error:
Hi Charlie, it of course defends on how much error/slippage can be tolerated.
For essentially no error, @ 44.1/48kHz, I'd say it takes about 8k taps used linear phase, so 4k taps of latency for about 93ms.
Below is a green target trace of a lin-phase BW30 4th order high pass.
With the blue trace being the FIR output of same filter dropped by 3dB for easy comparison.
Here's the same thing with tap count and latency half the above, so about 46ms....with its slippage.
FWIW, Looking at the big picture regarding low end magnitude roll-off phase linearization.... it may not be advisable.
Here's the step response of the first 8k tap example above, that held up well.
To the extent the dip below zero prior to t=0 (at 93ms) equates to pre-ring potential, we have a problem that can't be offset from acoustic summations like lin-phase crossovers do.
The same step dip and pre-ring potential will no doubt appear with a RIIR strategy too.
For essentially no error, @ 44.1/48kHz, I'd say it takes about 8k taps used linear phase, so 4k taps of latency for about 93ms.
Below is a green target trace of a lin-phase BW30 4th order high pass.
With the blue trace being the FIR output of same filter dropped by 3dB for easy comparison.
Here's the same thing with tap count and latency half the above, so about 46ms....with its slippage.
FWIW, Looking at the big picture regarding low end magnitude roll-off phase linearization.... it may not be advisable.
Here's the step response of the first 8k tap example above, that held up well.
To the extent the dip below zero prior to t=0 (at 93ms) equates to pre-ring potential, we have a problem that can't be offset from acoustic summations like lin-phase crossovers do.
The same step dip and pre-ring potential will no doubt appear with a RIIR strategy too.
All taps behind the peak are zero anyway and can be discarded, therefore 4k taps are sufficient and not too far away for the 3k taps I came up with in previous post.For essentially no error, @ 44.1/48kHz, I'd say it takes about 8k taps used linear phase, so 4k taps of latency for about 93ms.
@CharlieLaub , full phase unwrapping of the system highpass tends to sound bad, too many artifacts from the section before the main pulse (or step transition). Partial unwrapping from 4th order to 2nd order is a bit more benign but can be still audible with kick-drums and the like, unless there is masking from other signals. That also depends on the corner frequency, the lower the cutoff the more aggressive unwrapping can be perceptibly benign but the less benefit we get overall.
All taps behind the peak are zero anyway and can be discarded, therefore 4k taps are sufficient and not too far away for the 3k taps I came up with in previous post.
Sure. As you are phase linearizing an IIR, you only need half the taps as a straight linear-phase hpf, albeit ending up with the same latency
I get close to the same net results as your 3k taps, using 6k taps as lin-phase.
For very low frequency work, I think phase linearization of IIR gives probably somewhat better results than straight linear-phase hp and low pass, at least from a magnitude perspective
Because as I'm sure you know, we gain IIR's frequency resolution vs a typically much lower FIR frequency resolution.
The little bit of bottom end roll off phase linearization I do on top of the system high pass is phase only. In line with what you suggest.
I kind of split the difference in reducing group delay and accepting potential pre-ring. Seems like a fair compromise.
(I've measured and listened to the tradeoff outdoors till my eyes have crossed. Lol)
Crossover sub-to-main though, and all the rest of a speakers xovers, are always straight linear phase...it's just too easy to implement compared to two-step IIR linearizations.
The "4th order Butterworth response" combined output of the direct radiator and port can be viewed as one group delay of their two different arrival times.The reason I ask is that, to a first approximation, a vented box is like a 4th order Butterworth response (of course it would depend on the exact alignment used, etc.). I could completely flatten such a group delay using two second order reverse-IIR allpass filters but because of the low pole frequency (e.g. 30 Hz) the latency produced is around 170msec.
The box/port air spring Helmholtz resonance delays the output from the back wave of the speaker by 180 degrees, bringing it in phase with the front output. Voilà, ~+6dB combined output.
Whether 170ms latency with using two second order reverse-IIR allpass filters, or 69.6ms with 3072 taps, and regardless of whether phase unwrapping of the system highpass tends to sound bad (or doesn't..), neither can change the fact that the vent output lags the direct radiator output by 270 degrees at Fb (Frequency of Box tuning, 25ms at 30Hz Fb) shifting to 360 degrees above Fb, one complete cycle of latency.
Your preference can probably be explained by the amplitude level "ramp up" time of the port's output and it's decay time, as well as it lagging by one complete cycle from the front radiator output.But I'd like to know why I prefer sealed big box/driver bass more than reflexes...
Art
Have you tried a hybrid IIR lowpass + IIR allpass (phase linearisation) and an FIR highpass (with the appropriate delay(s) applied) ??For very low frequency work, I think phase linearization of IIR gives probably somewhat better results than straight linear-phase hp and low pass, at least from a magnitude perspective ...
Whether 170ms latency with using two second order reverse-IIR allpass filters, or 69.6ms with 3072 taps, and regardless of whether phase unwrapping of the system highpass tends to sound bad (or doesn't..), neither can change the fact that the vent output lags the direct radiator output by 270 degrees at Fb (Frequency of Box tuning, 25ms at 30Hz Fb) shifting to 360 degrees above Fb, one complete cycle of latency.
What you describe is (part of) the physical model and while it may sound intuitive, it is not what is really happening.Your preference can probably be explained by the amplitude level "ramp up" time of the port's output and it's decay time, as well as it lagging by one complete cycle from the front radiator output.
As long as dimensions and distances involved are small compared to the wavelengths we can safely use lumped model which tells us that both cone and port radiate simultaneously, albeit with different frequency responses, the cone being a highpass response with a dip at Fb, and the port being a bandpass with the peak at Fb. Just as seen from close-field measurements.
And then they simply add. Below resonance, port and cone roll off 2nd order but the combined responses with 90 deg offset gives partial cancellation leading to the 4th order roll-off.
The point is, which can be proven experimentally with a bit of care, that a closed box can be (min-phase) EQ'd to the mag and phase response of a vented one by addition of a 2nd order highpass, and as system theory tells us, they do and must sound exactly the same, as long as things are linear and without spuriae/noise arifacts.
It is the nonlinear stuff like distortion and port noise, and the midrange bleed, which can make them still sound a bit different and of course large-signal behavior and overdrive recovery is totally different for obvious reasons.
Anyway, we then can take the modeled 4th-order response of the modified closed box and apply the phase unwrapping and again it sounds the same (and typically not good) as the vented box with the same phase unwrapping and that's what is to be expected.
Same response (impulse response, or mag/phase frequency response) is same response, and sounds the same.
Last edited:
Here is a paper on the subject from 2014. The authors used the forward-backward IIR method and FIR, comparing the two for group delay EQ of the low end in a vented system:
https://www.dafx.de/paper-archive/2014/dafx14_stephan_herzog_low_frequency_group_delay.pdf
This is the source of my comment about a 4th order Butterworth response as a model for a vented system...
https://www.dafx.de/paper-archive/2014/dafx14_stephan_herzog_low_frequency_group_delay.pdf
This is the source of my comment about a 4th order Butterworth response as a model for a vented system...
- Home
- Loudspeakers
- Multi-Way
- Removing Loudspeaker Group Delay using reverse-IIR filtering