Yes, although I'd guess that in general the additional forward (post) masking would be more significant than backward (pre) masking. Most music signals largely consist of impulsive onsets with slower decay.
Thinking about it more, I'd be inclined to doubt that pre-ringing from linear/near-linear phase crossovers is much of an issue in practice. In the case of pre-ringing in the direct sound, the spectral coloration from poor summation would probably be more objectionable than the ringing itself (save for extreme cases, perhaps). Pre-ringing in the reflected sound would be masked by the first arrival unless the ringing is substantially longer duration than the reflection delay.
Post peak masking is stronger than masking before the peak regardless of the type of signal.
Although I made a joke about it in the first post or two, the use case that I find most interesting is definitely NOT making the entire loudspeaker linear phase so that somewhere on the design axis it will produce acoustic square waves. That's just not really necessary. Human hearing cannot tell the different between a perfect square wave a a pretty phase-randomized version of that, up to some threshold which turns out to be rather liberal. But there are other interesting uses, and people can do with it what they wish.
There's a subtle distinction here, which probably explains what @newvirus2008 is getting at: In real time, you can make the system linear phase but not zero phase. Zero phase means zero group delay. Linear phase means constant group delay.THAT is exactly what it does, yes.
Well, yes, but my point was that compared to clicks and such, music signals may not reduce the audibility of pre-ringing that much.Post peak masking is stronger than masking before the peak regardless of the type of signal.
That's right it is not creating a zero phase output, but only linear phase.
Removing the group delay does not have to imply removing the passthrough-delay of the system; the processing just eliminates the relative delay among and between frequencies in the signal. The reverse-IIR processing will increase the overall delay or latency between input and output.
Removing the group delay does not have to imply removing the passthrough-delay of the system; the processing just eliminates the relative delay among and between frequencies in the signal. The reverse-IIR processing will increase the overall delay or latency between input and output.
Square wave is a very bad test signal because it only contains odd-order components which alway gives fully symmetric waveforms for quasi steady-state input.Although I made a joke about it in the first post or two, the use case that I find most interesting is definitely NOT making the entire loudspeaker linear phase so that somewhere on the design axis it will produce acoustic square waves. That's just not really necessary. Human hearing cannot tell the different between a perfect square wave a a pretty phase-randomized version of that, up to some threshold which turns out to be rather liberal. But there are other interesting uses, and people can do with it what they wish.
Take a low-frequency signal that contains significant even-order harmonics then the picture changes dramatically. While the delay effect ("bass coming late") needs significant group delay to be audible as such, the timbral changes are readily heard (at frequencies below 500Hz or so) once the relative phase of the even-order overtones to the fundamental changes in a range of 90..270 degrees (modulo 360) from one group delay to another, different one. Phase is what matters for quasi-steady state signal like bass guitar.
The root cause is the same that is responsible for the change of timbre when polarity is inverted (so no delay at all), at low to mid frequencies we hear the actual waveform and that is a non-linear process which is asymmetric.
The simplest and most robust (immune to actual speaker phase distortion) test signal is a low frequency (say, 80Hz) sine + 2nd harmonic (same level) but this harmonic ever so slightly detuned, say 0.5Hz off. By this the phase of the 2nd very slowly rotates through the whole circle, every 2 seconds. Onc you hear the corresponding cyclic timbre shifting (I'm pretty confident very many people can hear the difference with a bit of care), switch to discrete phase offsets to remove the "detuned!" clue for proper ABX'ing. Use pairs that are 180 degree apart for the 2nd (flipped polarity of the 2nd in one of the members). Make a whole set of these in 30 or 45 degree absolute steps of 2nd vs fundamental. There will be two pairs that are more audibly different than all others, and there are two other pairs where it is completely impossible to tell them apart. The most differing one is the pair which has the highest asymmetry in the effective signal at the eardrum. The most identical pair is the one that has maximum waveform symmetry.
But transient signals are affect as well, in perception. A positive step with an exponential decay (synthetic "kick drum") sounds different than a negative one. And backward version sounds different than forward original, and a linear phase version sound yet again different. On top of that, certain amounts of variable group delay / phase response do also sound different for all of these signals. However, for the transient tests a minimum-phase playback system is highly favorable, that means any XO must be linear-phase. Otherwise it's phase response modifies the phase relationships so that the effective phase relationhships become sort of uncontrolled.
Sorry for that monster off-topic post.
So far I have been focused on how to reduce group delay produced by the crossover sum. In addition to that, it might be interesting to look at the response from each crossover alone, e.g. the LP impulse response, and the HP impulse response, to gain a better understand of the ringing of each (based on recent comments here, these will still ring). This would shine some light on the "off-axis ringing" issue, I think, and it would not be too difficult to do.
I've looked at this and haven't gained much insight, other than it is standalone linear phase high-pass filters that seem to be the instigators of pre-ring potential.
If looking at linear scale impulse responses, here's a set at 100, 250, 750, and 3500Hz 96 dB/oct hpf's (my current xover points on a 5-way)
You can see they all are stacked on top of each other and look close to a pulse, being dominated by high frequency data.
In comparison, here's same set but now low pass.
Time scale is the same.
Ok, now for Step response...first the low passes.
And here are the Step of the high-passes.
You can see the lower the high pass frequencies, the more step dives below zero.
My summary takes on linear phase HP and LP, with regard to pre-ring potential are:
The have to be evaluated as crossovers, how well the two sides sum to acoustic complementary.
And do not phase linearize the system high pass. (if relying on step to indicate pre-ring)
Since the sum of the LP and HP filter outputs should combine to produce a step, it is no surprise that the HP response looks like it does.
@gberchin said it well:
@mark100 You showed the frequency response for your filters down to about -36dB. What is happening below that? E.g. is this a phase linearaized LR or Butterworth 16th order filter, or a Chebyshev/ elliptic type response?
The reason I ask is that one of the DFE crossovers that I recently released has a slope of around 135dB/oct but only for 1.4 octaves - it's an elliptic type response. I will probably investigate one of the DFE crossovers in the same way, so I want to see if the responses are comparable to your results.
@gberchin said it well:
Yes. Filtering is filtering. Whether FIR or IIR, digital or analog, is merely a detail of implementation.
@mark100 You showed the frequency response for your filters down to about -36dB. What is happening below that? E.g. is this a phase linearaized LR or Butterworth 16th order filter, or a Chebyshev/ elliptic type response?
The reason I ask is that one of the DFE crossovers that I recently released has a slope of around 135dB/oct but only for 1.4 octaves - it's an elliptic type response. I will probably investigate one of the DFE crossovers in the same way, so I want to see if the responses are comparable to your results.
@mark100 You showed the frequency response for your filters down to about -36dB. What is happening below that? E.g. is this a phase linearaized LR or Butterworth 16th order filter, or a Chebyshev/ elliptic type response?
The reason I ask is that one of the DFE crossovers that I recently released has a slope of around 135dB/oct but only for 1.4 octaves - it's an elliptic type response. I will probably investigate one of the DFE crossovers in the same way, so I want to see if the responses are comparable to your results.
Gotcha, and these are the kind of comparisons I find very helpful in assessing alternatives.
I always use plain FIR linear-phase complementary high-pass and low-pass, and never phase linearize an existing IIR filter. (for reasons stated in prior post).
Here is a set of three 120dB/oct LR hpf's, all at 100Hz,
but using a different number of taps for each. (all at 48kHz sampling)
Red is 2048 taps, so about 21ms latency.
Green is 4096 taps, about 43ms.
Blue is 16384 taps, about 170ms.
As you can see, the red trace begins to look more like an elliptical; that's the effect of not having enough taps to hold to a steep LR.
Green comes close to holding.
Blue holds.
So sufficient tap count, or alternatively sufficient latency, is the key determinant.
I truly believe any and all phase linearization strategies need to be compared with equal latency.
Are you simply truncating the impulse response at the selected number of taps? The effects of such truncation can be manipulated by also tapering the ends of the truncated impulse response. Of course, multiplying by a window in the time domain results in convolution in the frequency domain, which will modify the frequency response. It's all math, but implementing it is something of an "art".Here is a set of three 120dB/oct LR hpf's, all at 100Hz, but using a different number of taps for each.
I rarely peek at the actual coefficients the auto-FIR generators produce. When I do the coefficients' values are always smaller on the tails and larger in the center....so I guess that means tapered as you speak of?Are you simply truncating the impulse response at the selected number of taps?
Here's the file you can look at, with 4096 taps/coefficients that produced the Green trace in prior post.
I would like to understand more about what makes FIR generation an art...at a high level, if that's possible.
Attachments
Could be, but not necessarily. Most filters that I have encountered follow that form -- tall in the middle and small at the ends. I'm speaking specifically of softening the ends of a long impulse response by tapering, instead of simply chopping them off by truncation.... the coefficients' values are always smaller on the tails and larger in the center....so I guess that means tapered as you speak of?
If your design tool tapers the ends, then it probably says so somewhere in the user's manual.
When truncating and/or tapering, in multiple domains, it is the delicate interplay between multiplication (windowing) in one domain and convolution in the other that makes it an art. To go into greater detail is probably too involved for a forum post.I would like to understand more about what makes FIR generation an art...at a high level, if that's possible.
EDIT: It's really hard to tell by inspection whether your data set is truncated or tapered.
Last edited:
Aah, good question and point, at same time.Mark100, simple question, what window did you use ?
Hanning for the file posted, just because it's the program default.
I quickly see the difference in tails coefficients, the degree of tapering, changing widows.
If your design tool tapers the ends, then it probably says so somewhere in the user's manual.
When truncating and/or tapering, in multiple domains, it is the delicate interplay between multiplication (windowing) in one domain and convolution in the other that makes it an art. To go into greater detail is probably too involved for a forum post.
Thx.
No such info in the users manual. It's not the level of detail that the products cater to, which ironically is the prosound live and install markets.
I say ironically because live is the least likely market to be able to tolerate latency.
Install however? Who knows...that market is THE source of new science and processing imo.
Check out this vid of a presentation by the audio designer for the Las Vegas Sphere.
Over 160,000 drivers, each driver with its own channel of DSP and amplification. And it was basically a DIY project, having never been done before !!
Interesting swerve for all, i hope...
It might help to take a closer look how rePhase does it:I would like to understand more about what makes FIR generation an art...at a high level, if that's possible.
- define parameters for analytical target functions, including the usual textbook XO filter targets, obtaining magnitude and phase information
- make an inverse FFT to create its impulse response, based on FFT size (# of taps), pulse center position and window (if any)
- make an FFT again to see the actual magnitude and phase response
With a bit back and forth, twiddling with the FFT parameters manually and modifying the target, one may get somewhat "close enough" to the desired original target. That's what makes it an art, IMHO.
However, the smart solution to this is to let an optimizing algorithm do the tedious work. The basic inner workings of rePhase's optimizer are laid out in this (old) post of the rePhase author.
This adjustable optimizer is the really exiting and invaluable feature of rePhase, as it often allows reduction of the FFT size to near the theoretical limit, with totally insignificant magnitude and very tolerable phase error (phase sometimes gets worse, though, depending on window setting). Since FFT size has no restrictions (not limited to 2^N) one can really fine-tune the number of taps which of course is only useful if the convolver can handle arbitrary sizes as well. FFT/iFFT-based ones ususally can't, but for small sizes direct convolution becomes feasible.
Coming back to the thread topic, as far as I can see now the new algorithm is restricted to simple transfer functions with a quite limited number of poles and zeros, otherwise the computational benefit will suffer quickly. Within its limitations, it is as good as it gets, efficiency-wise.
Thank you KSTR, good explanations....and you took me down a nice trail on memory lane..It might help to take a closer look how rePhase does it:
I love rePhase. It and a few miniDSP OpenDRCs are what started me into FIR around 2016.
Just now, I kept reading past the optimization post you linked,... remembering scouring the whole rePhase thread over and again, trying to learn what was entirely new to me.
I had great success with rePhase, using this basic technique POS posted in #499. (in combination with the optimization choices)
Quoting POS,
"Anyhow, the easiest solution to get any acoustical filter you want is to EQ your drivers for flat (amplitude and phase) using any amount of EQ you need (watch your noise floor though), and then apply your filter(s).
That way you can try different filters slopes and types without having to redo all your EQing."
That technique has become the cornerstone of my DIY speaker tuning/processing. Simple, plain as day, works !!! 😀
The technique can require significant out-of-band flattening prior to applying linear-phase crossovers, which is far more work than in-band.
The amount of minimum phase EQ work, both in-band and out, is what led me to the EclipseAudio FirDesigner products. They have acoustic target matching, so the flattening work becomes automatic. Let me easily experiment with different complementary xover types and orders.
My plan is to implement first and second order filters only, and then one just cascades them if higher order filtering is desired. It's the same when using forward IIR...Coming back to the thread topic, as far as I can see now the new algorithm is restricted to simple transfer functions with a quite limited number of poles and zeros, otherwise the computational benefit will suffer quickly. Within its limitations, it is as good as it gets, efficiency-wise.
Thank you KSTR, good explanations....and you took me down a nice trail on memory lane..
I love rePhase. It and a few miniDSP OpenDRCs are what started me into FIR around 2016.
Just now, I kept reading past the optimization post you linked,... remembering scouring the whole rePhase thread over and again, trying to learn what was entirely new to me.
I had great success with rePhase, using this basic technique POS posted in #499. (in combination with the optimization choices)
Quoting POS,
"Anyhow, the easiest solution to get any acoustical filter you want is to EQ your drivers for flat (amplitude and phase) using any amount of EQ you need (watch your noise floor though), and then apply your filter(s).
That way you can try different filters slopes and types without having to redo all your EQing."
That technique has become the cornerstone of my DIY speaker tuning/processing. Simple, plain as day, works !!! 😀
The technique can require significant out-of-band flattening prior to applying linear-phase crossovers, which is far more work than in-band.
The amount of minimum phase EQ work, both in-band and out, is what led me to the EclipseAudio FirDesigner products. They have acoustic target matching, so the flattening work becomes automatic. Let me easily experiment with different complementary xover types and orders.
EQing drivers flat, at least a couple of octaves beyond the desired passband edge frequencies, tends to make the phase response within the desired passband region flat with a phase angle near zero (assuming they are time aligned). This sort of takes their phase contribution out of the design process, and all you have to worry about is the phase response of the crossover filters. It's a worthy approach. But it is also possible to make adjustments to driver phase using allpass and digital delay without having to apply lots of gain where the driver's response is rolling off just to flatten the phase...
in the end, as long as the drivers are in relative phase alignment in the crossover region all is well. The phase response outside of their respective passband is not important.
Yep. All IIR or analog filtering lives from reduced complexity. So if we are to use an arbitrary transfer function, like one coming from a measurement after post-processing (smoothing, etc) we need to find a low-complexity analytic equivalent, extracting only the relevant poles and zeros from the response.My plan is to implement first and second order filters only, and then one just cascades them if higher order filtering is desired. It's the same when using forward IIR...
Up to now, I've mostly used LSPcad for curve fitting an analytical model to a given response, using educated guesses for the required filter blocks... so, sort of semi-automated only. With a vector fitting algorithm, that part could become almost fully automated as well. Vector fitting (see here and here, for example) is a well-established method in engineering but personally I don't have any experience with it.
Since the allpass response is characterized by one (for first order, e.g. Fpole) or two (for second order, e.g. Fpole and Qpole) variables there is not really a need to do anything complicated. Any non-linear minimization algorithm would be more than capable. Recently I have been using the one built into Excel (GRG Nonlinear Solving Method for nonlinear optimization), since it is easy to formulate problems and plot data there.
I would do it this way:
1. The user provides some group delay response that they wish to fit. This could come from measurement or a box model, etc.
2. The minimization engine fits the group delay produced by N first order and M second order allpass filters to the group delay response provided.
3. The values for N and M start out small, e.g. 0 and 1 or 1 and 1 or whatever the user chooses, and then a fitting round takes place.
4. The user (or the program) then increases N and or M and another fitting round takes place.
5. The program keeps track of the fit metric in each round. At the end the user can decide which set of allpass filters provides the best balance between complexity (number of allpass filters) and quality (of the fit to the user's GD data).
I have an Excel spreadsheet for filter design that I could adapt to a task like this and make it available if that was of interest.
I would do it this way:
1. The user provides some group delay response that they wish to fit. This could come from measurement or a box model, etc.
2. The minimization engine fits the group delay produced by N first order and M second order allpass filters to the group delay response provided.
3. The values for N and M start out small, e.g. 0 and 1 or 1 and 1 or whatever the user chooses, and then a fitting round takes place.
4. The user (or the program) then increases N and or M and another fitting round takes place.
5. The program keeps track of the fit metric in each round. At the end the user can decide which set of allpass filters provides the best balance between complexity (number of allpass filters) and quality (of the fit to the user's GD data).
I have an Excel spreadsheet for filter design that I could adapt to a task like this and make it available if that was of interest.
Hi, I strongly recommend trying to make it web app as well, as it would be infinitely more usable. It's quite a task to get excel sheets from internet working so only few determined people will ever use it.
You could mashup libraries together so first prototype shouldn't bee too big of a task assuming algorithms you need are found from github. Ideally users could export data from rew or vituixcad, image or numerical data, and upload that to the webapp. Visuals can be done with D3 library for example.
You could mashup libraries together so first prototype shouldn't bee too big of a task assuming algorithms you need are found from github. Ideally users could export data from rew or vituixcad, image or numerical data, and upload that to the webapp. Visuals can be done with D3 library for example.
Last edited:
- Home
- Loudspeakers
- Multi-Way
- Removing Loudspeaker Group Delay using reverse-IIR filtering