rePhase, a loudspeaker phase linearization, EQ and FIR filtering tool

@mark100
Thank you, I'll read it and get back to you.

@jmbee
There is nothing wrong in having ripples before the peak in the impulse response (is that what that waveform is?).
The impulse response of an ideal rect filter (its reverse Fourier transform), is actually a sinc, which has infinite ripples before and after its peak.
The more ripples in the time domain for the impulse response, the more ideal the brickwall (rect) filter is.
Of course, since this ideal filter would be mathematically non-causal, you have to make do and truncate the ripples, but that's another story.
Impulse response is not the output of the filter (it is only in the case of an ideal impulse as its input).
You probably want to see more ripples (longer window of impulse response not being 0) in the impulse response, so that the frequency response is closer to an ideal brickwall filter.
Deviations from this ideal filter due to limited taps cause noise on the output signal (deviations from the ideal expected waveform). This noise may or may not, in the time domain, show up in the output waveform as something recognizable as pre or post ringing.
 
Last edited:
@mark100

I seem to gather that the impulse responses mentioned in the article are actually the output of the filter after it is presented at its input with something that resembles an impulse (PR and BPR).
This seems to bring about two different impulse responses, depending on the type of excitement, which is where I think the disconnect happens with my mathematical background.
In fact, a filter has only ONE determined impulse response, which is independent from the input.
As I wrote above, the output of the filter is equal to its impulse response (intended in the mathematical sense) only when the filter is provided with an ideal impulse response at its input.

Let alone the mathematical disconnect, I think it is important to say that if a filter (FIR, linear phase) were an ideal brickwall, and you were to present at its input an ideal impulse, you would EXPECT the output to have ripples.
Mathematically, you would expect a sinc function.
This is because an impulse has infinite spectral content (its Fourier transform is 1, that is flat frequency response), and when processed through a linear phase FIR filter that, let's say, removes all frequencies after a certain value, it produces a sinc function at the output.
 
I think it's easier to seperate the discussion of the limited taps effects from general filter design effects as, for example, (pre-)ringing. Both are completly different.

In the case of linear phase crossover filters each way has its own (pre)ringing - while they cancel each other in the sum to form a perfect symetrical bandwith-limited pulse . Of course this is true on axis only - a bad idea for crossover filters.

Compensating just the exess pase sounds much better for me. The sum is then just the minphase bandwith-limited pulse. There is no preringing at all. Not perfectly cancelled postringing offaxis is completly natural - you can't distinguish it from the effects of different radiation patterns on different frequencies.
 
To really know what an IR is showing us, one should dissect it further. The representation in most programs gives us an indication of how it's performing, yet it won't show all of it in detail.
It usually primarily 'shows/is shaped by' the high frequency content. But all of the info is there if you want to see more from it. In REW one can use the filtered IR tab to see how other frequencies are doing. You could also use gating set before the main peak to get an indication of the frequency spectrum that arrives before the main pulse (jumping back to the FR plot after setting that gating).
 
torgeirs,

Not only FIR filters can distort going steeper slopes also IIR makes their signature that we in past were forced to live with :)

Subwoofer filter LR 8th order at 80Hz verse linear phase inside a 20Hz-20kHz IIR pass band.
attachment.php

Nice way to present the group delay!
A little cheating to not show the initial delay of the FIR filter, as FIR filters trade group delay with initial time delay (same for all frequencies)
 
torgeirs, the steeper the slope the longer the ringing, that is all there is to it, and this is true for IIR and FIR.
FIR let you design steeper slope, increasing possible ringing.
It also let you design linear-phase filters, wich moves hald of the ringing in front of the impulse (preringing).

A 24dB/oct FIR filter will have the same amount of ringing than the equivalent IIR filter. Less in fact, as the IIR is infinite...

This is all good, and can't be repeated often enough.

Don't think 24dB/oct filters will create artifacts when one filter is time shifted less than 1ms.

But somewhere ther is a limit at x dB/oct where artifacts can be heard.
The paper don't give us that x, but show that it exists.

Wonder what it is for LR? 48dB/oct? 96dB/oct? or maybe higher?
 
@sax512: I made a thesis 25 years ago about a mixer for subband coded signals. Then of course sharp filters are used to make the subbands. Think the length of each packet was 32 ms. And inside a subband one reconed the masking of noise is very high bacause of Haas effect and the likes. When combining the subbands I could not detect artifacts as the ringing is counteracted by the nearest subband( as they are not time shifted.)

The discussion is when two highorder filters that IS timeshifted (different distance to each speaker element) will generate clearly audible artifacts.
Reading the paper from Finland, I was supprised a time shift as low as 0.1 ms could be detected by listeners. (I expected at least 1 ms). The filters most sucessable to artifacts was where the ear is most sensitive at 3k Hz. It seems steep filters were used. And the artifacts startet at an given steepness and then grew with the steepness.
The Finish paper argues the destroyed cancelling of the ringing, bacause of the timeshift between the filters, cause the artifacts.
 
Nice way to present the group delay!
A little cheating to not show the initial delay of the FIR filter, as FIR filters trade group delay with initial time delay (same for all frequencies)

I do hope you realize FIR filters don't have to have initial delay. A FIR filter does not have to be linear phase. It's an option. :) An option that made them popular. It's not a requirement for FIR filters. It depends on what you (want) do with them.
You could use a long FIR filter and set a LR24 crossover with it and have it perform without initial delay and it would have the normal group delay of the LR24 crossover. Just saying...

Such a long FIR filter would not have any of the problems described in that paper and still be a long FIR filter. Just to demonstrate that "what you do with it" is more important than the method of filtering used.
 
Don't think 24dB/oct filters will create artifacts when one filter is time shifted less than 1ms.

Hi, I'm having trouble following along...
What do you mean by one filter is time shifted?

Doesn't proper time alignment mean both filters stay in sync (phase) throughout crossover overlap?
I must be missing something, because I know 1ms is a gigantic time misalignment between drivers.

Do you maybe mean 1 ms worth of latency, eg say using complementary LR FIR filters, both side of crossover with 48 taps at a 48kHz sampling?
Or maybe the LPF is using 96 taps, and the HPF 48 taps, for a net 1ms difference between passbands, that needs be offset with delay elsewhere?

I guess I'm asking how can you shift only one filter?
 
Hi, I'm having trouble following along...
What do you mean by one filter is time shifted?

Doesn't proper time alignment mean both filters stay in sync (phase) throughout crossover overlap?
I must be missing something, because I know 1ms is a gigantic time misalignment between drivers.

Do you maybe mean 1 ms worth of latency, eg say using complementary LR FIR filters, both side of crossover with 48 taps at a 48kHz sampling?
Or maybe the LPF is using 96 taps, and the HPF 48 taps, for a net 1ms difference between passbands, that needs be offset with delay elsewhere?

I guess I'm asking how can you shift only one filter?

If you ask me he was referring to moving off axis (like in that paper torgeirs linked earlier) where the speaker in question might show a different alignment between drivers off axis compared to on axis.
Depending on where the crossover would be 1 ms could be huge. :)

Don't move up or down with most multi way speakers out there :D. Though a 34 cm shift between drivers when moving off axis might be a bit much.
Try it here: Time difference per sound path distance ms per meter or length millimeters time of arrival milliseconds calculation calculate delay line noise sound wave in air calculator variance ITD Haas effect duration - sengpielaudio Sengpiel Berlin
 
The discussion is when two highorder filters that IS timeshifted (different distance to each speaker element) will generate clearly audible artifacts.

Got it. But that's not a problem of pre-ringing, as indicated by many by the pre-peak part of the impulse response. Again, it's probably worth repeating, those pre-peak ripples are SUPPOSED to be there.

You're talking about two drivers producing the same range of frequencies and the artifacts that result.
I completely agree with you and that's why after listening to my first full range I never went back to 2 or more ways speakers.
Still, it is a completely different thing.

I think what most people have a hard time to grasp is that a Dirac impulse excitement as input to a brickwall filter, ideally, SHOULD produce an infinite output waveform.
I'm also convinced this is closely related to the fact that people think of a brickwall filter as an interpolator, while it is nothing like that. It is a device that adds sinc functions that are proportional to the samples at its input.
 
Last edited:
Hi, I'm having trouble following along...
What do you mean by one filter is time shifted?

Doesn't proper time alignment mean both filters stay in sync (phase) throughout crossover overlap?
I must be missing something, because I know 1ms is a gigantic time misalignment between drivers.

Do you maybe mean 1 ms worth of latency, eg say using complementary LR FIR filters, both side of crossover with 48 taps at a 48kHz sampling?
Or maybe the LPF is using 96 taps, and the HPF 48 taps, for a net 1ms difference between passbands, that needs be offset with delay elsewhere?

I guess I'm asking how can you shift only one filter?
What I was trying to say was that i doubt there will be off axis artifacts with a 24dB/oct filter. Analog, IIR or FIR. With artifacts I mean sounds that is heard as seperate noiselike sounds.
And, yes, its the difference in pathlength. Of course also both filters are shiftet in time as you sit away from the speakers:)
 
@Sax512: I think it is interesting to see how ringing interacts when combined with a time shift. The finnish paper show that there can be very small changes in frequensy response, 0.1 dB, and still artifacts can be heard. So I still believe the time response is the reason.
(The time response do not look as an dirac at all, asymetric, huge sidelobes, not uniformly falling sidelobes etc., So we are not talking small ripples here)
 
As an exercise, create a perfect Dirac pulse in REW. It wil look like that straight pointy thing. Now shift it in time in REW (controls: t=0 offset). See how there's ripple both in front and after the pulse? Does this mean if I press play too late I get pré ringing? :D

My understanding is that rew shift the impulse response inside the window. Then it is not symetric anymore, and you have extra ripples
 
Ok, let me add a followup question after reading further posts...

The time shift being discussed...where exactly is it coming from?

(I know even tiny shifts of a couple of samples, 0.04ms, of pure delay, are easily audible at 6300hz, with pink noise tuning a bms coax CD.)

So the bms coax should not be affected by these effects if the drivers are perfectly time alligned and have same directivity at the frequency i question.