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

Hi chebum,

Think try understand that natural direct sounds in enviroment and also transducers are of minimum phase kind and that sounds perfect and natural as we used to, interference as reflections and difraction are from ground also of minimum phase but in they can take time to arrive it often looks like some kind of linear phase (non minimum phase).

It looks you use linear phase to smooth your transducers direct sound and that is the mistake, if one is sure measurement is of a good quality (direct sound) then use whatever minimum phase EQ filters it takes to smooth transducer, that is when you smooth out (EQ) the amplitude domain you automatic smooth out the phase pattern that belongs to that minimum phase band pass.

Where use of linear phase (FIR) filters comes in, is as a tool to repair the excess phase distortion that happens when we sum multiple minimum phase band passes (XO points) to cover a broad audio band as was it one perfect minimum phase tranducer covering say 20Hz-20kHz.

There is a couple of ways in Rephase to linearize XO point slopes right, one is to first EQ transducer flat as a pancake with whatever minimum phase filters it takes and then in the end add the desired linear phase slope using "Linear-Phase Filters" tab, to get it flat as a pancake also in lows use "compensate" mode on "Minimum-Phase Filters" tab which is a brutal boost at first up until one also set the linear phase filter slope. Second way is to massage tranducer into a smooth minimum phase passband with a known minimum phase slope (stop band), say we set that target slope to be a 700Hz 16th order LR high pass as in your example, then go to "Filters Linearization" tab and pick the known slope to get that known minimum filters huge phase turn linearized.
 
Many-many thanks for the suggestions. I did a quick testing by changing the eq setting from "linear-phase" to "minimum-phase" and disabled the phase eq completely. Indeed it helped sound a lot.

desired linear phase slope using "Linear-Phase Filters" tab, to get it flat as a pancake also in lows use "compensate" mode on "Minimum-Phase Filters" tab which is a brutal boost at first up until one also set the linear phase filter slope.

Could you describe a bit more what's the difference between linear-filter vs minimum-phase filter + phase correction? For example, if we do both in rephase.
 
...Could you describe a bit more what's the difference between linear-filter vs minimum-phase filter + phase correction? For example, if we do both in rephase.

Did a general quick description in i have some other stuff to do right now, if you want more info i can get back later today or tomorrow with some how to do it in practical.

In general a difference is that for whatever real world minimum phase filters (IIR) we dial on amplitude response and then phase will always change with a certain pattern belonging to that amplitude and filters can be real time, for linear phase filters (FIR) we can choose dial only amplitude or dial only phase or a mix of both amplitude and phase and using the mix one can actual set a normal IIR filter using FIR tools, FIR filters have some more or less of time lag.

To understand domain of minimum phase see below how a 2nd order butterworth bandpass of 20Hz-20kHz amplitude would look like, phase change 90º per order so its a 180º turn down at zero Hz and exactly half way 90º at -3dB point for the 20Hz 2nd order slope, and same scheme is seen up at HF area for the 20kHz low pass slope, and for example the default flat amplitude and phase we see at start up Rephase is also of minimum phase its just that it has infinite bandwidth from DC (zero Hz) to lightspeed:
attachment.php


Same amplitude system band pass as above, but in its a sum of two transducers using IIR filtering in a 8th order Linkwitz Riley slope at 700Hz we end up add 720º of excess phase turn at 700Hz from that filter:
attachment.php


Same as above showing the two IIR band passes that sum to above system sum:
attachment.php


What Rephase is good at :) same two band passes as above but now phase turn of XO point is linearized so total system phase and amplitude is same as in the very first example:
attachment.php
 

Attachments

  • 1050a.png
    1050a.png
    6.8 KB · Views: 697
  • 1050b.png
    1050b.png
    7.5 KB · Views: 608
  • 1050c.png
    1050c.png
    8.9 KB · Views: 594
  • 1050d.png
    1050d.png
    8.1 KB · Views: 643
Last edited:
Did a general quick description in i have some other stuff to do right now, if you want more info i can get back later today or tomorrow with some how to do it in practical.

I'm sorry for wasting your time with imprecise question. It was obvious to me yesterday, but currently I see I had to be more specific. I'm sorry for this.

I wanted to ask about rephrase options. It allows to create minphase and linear phase filter slopes. Also, it allows to add phase corrections. Will there be any difference between 1) linear phase 24db LR filter and 2) minimum phase 24 db LR filter, created in rephrase, plus phase corrections. Assuming that we create filters using same amount of taps for both options. Both options are strictly fir-based with no iir involved.
 
I have a feeling that FIR-filters "oversharpens" to the sounds. It sounds like particular sounds have contours around them. Similar to what we see on oversharpenned photos from mobile phones. Similar but minimum-phase IIR-filters don't produce these artefacts.

Does anybody hear something similar?

I use rePhase to generate FIR-filters. I suppose I may not be using it correctly. If it's only me hearing the issue, could you check my filter settings? I believe there may be something wrong with my configuration.

780065d1567896996-rephase-loudspeaker-phase-linearization-eq-fir-filtering-tool-rephase1-jpg


780066d1567896996-rephase-loudspeaker-phase-linearization-eq-fir-filtering-tool-rephase2-jpg



Try using rectangular window with exact centering.
That sounds the best for me.

I can’t tell you why (I am still a novice).


That metallic like sound I am familiar with.
Also I’m not sure you need that many taps????
(That I cant speak to but I don’t use more than 6144 because I can’t and can do just about anything I want)
 
Try using rectangular window with exact centering.

That sounds the best for me.



Also I’m not sure you need that many taps????

Thank you for the suggestion.
I need that many taps because I'm processing sound with 176400 sampling rate. Actually, it's just 400ms filter. I don't feel it's long enough, because filter slopes at low frequencies aren't precise. Unfortunately, I cannot use longer filters, because the filters are used for home cinema and TV doesn't allow longer delays.
 
I wanted to ask about rephrase options. It allows to create minphase and linear phase filter slopes. Also, it allows to add phase corrections. Will there be any difference between 1) linear phase 24db LR filter and 2) minimum phase 24 db LR filter, created in rephrase, plus phase corrections. Assuming that we create filters using same amount of taps for both options. Both options are strictly fir-based with no iir involved.

In theory there should not be any differences between the two. However it can be quite complicated to get it right with indoor measurements. A good LR crossover should not just be the slope you select from a drop down list but rather it should be the measured acoustic slope that follows the chosen LR curve.
The driver(s) itself will have it's own point where the energy falls off. That should all be part of the total combined acoustic slope determining the (named Linkwitz Riley) end result.

If you try to set a linear phase crossover at a certain frequency as with your first option, the driver's own roll off will probably still alter the end result. Unless you can EQ the driver response flat about ~2 octaves past your desired crossover frequency before applying the linear phase crossover.

With the second option it becomes rather difficult to get the right reflection free measurements to base your phase corrections on. Every reflection in such a measurement will alter the phase plot as well (and the FR plot to some extend).

Most of us don't have an anechoic chamber, so we have to search for other ways to get as close as possible. For instance outside measurements, gated measurements etc.
 
Last edited:
I wanted to ask about rephrase options. It allows to create minphase and linear phase filter slopes. Also, it allows to add phase corrections. Will there be any difference between 1) linear phase 24db LR filter and 2) minimum phase 24 db LR filter, created in rephrase, plus phase corrections. Assuming that we create filters using same amount of taps for both options. Both options are strictly fir-based with no iir involved.

I'm trying to add to Wesayso's excellent reply, which matches my understandings and experiences.

As Wesayso said, for making a linear phase 24dB LR, there should be no difference in either technique. You can see this using rePhase...put in a min-phase LR and then use Filters Linearization on it...

His point about needing to EQ a driver response flat extending about 2 octaves past crossover is a biggie imo. The extension needs to be via IIR.

Using IIR EQ, doing this flattening will also flatten the phase roll-off.
If you could get the extension perfectly flat, when you then lay a linear phase xover on top of that IIR correction, the sum of the xover and the IIR EQs will give the exact electrical crossover needed to generate an acoustic xover that matches the lin phase crossover order !
And the crossover doesn't necessarily have to be lin-phase, even with min-phase you still end up with an acoustic order that matches the xover order. Just no flat phase.
Such an easy way to do crossovers.

But of course, extending the rolloff for 2 octaves isn't often doable.
A good solution is extend as far as feasible, and use a higher order crossover that is down 30-40dB before getting out of the flat extension zone.

Hopefully, if anything I've said is amiss, Wesayso, Pos, or someone will correct..
 
Thank you for the suggestion.
I need that many taps because I'm processing sound with 176400 sampling rate. Actually, it's just 400ms filter. I don't feel it's long enough, because filter slopes at low frequencies aren't precise. Unfortunately, I cannot use longer filters, because the filters are used for home cinema and TV doesn't allow longer delays.


:banghead:
 
But of course, extending the rolloff for 2 octaves isn't often doable.
A good solution is extend as far as feasible, and use a higher order crossover that is down 30-40dB before getting out of the flat extension zone.
The minimum-phase filter "compensate" mode is a good way to obtain this, as noted by BYRTT above.
With care and a proper distance and gating you can often obtain stop-band measurement that are good and usable down to the measurement noise floor.
 
Try using rectangular window with exact centering.
That sounds the best for me.
"exact centering" should only be used when you really want the exact delay you specified, for some reason.
"closest perfect impulse" is the recommended setting in any other scenario, and will result in a delay that matches the specified on +/- half a sample (which you can check in the status report below the generate button)
 
The minimum-phase filter "compensate" mode is a good way to obtain this, as noted by BYRTT above.
With care and a proper distance and gating you can often obtain stop-band measurement that are good and usable down to the measurement noise floor.

Thank you Pos, I have had good success with "compensate" for that purpose.
But I have to admit, I still feel my use of it is too much trial and error, without a well understood sequence.

Is there a process you would recommend?
Maybe using a mid-bass driver with both low freq and high freq roll-off, as an example....

Or if easier, pls critique/guide the way I've been trying to use compensate...?
Typically, I'll start with LPF compensation with a BW, with the frequency set where rolloff looks to occur. Been using BW because it has both odd and even order.
I'll play with that and 'time offset' until mag and phase start to look reasonable.
Then I go to the lower end with a compensate BW HPF ....same process.
And just keep trial and error going until between both compensate filters and time offset.

I'm thinking there has to be a better, more structured way :)
Or at the very least, am i starting from the correct end..(HF)?

Oh, and I don't understand what you meant with "proper distance and gating"
Sorry, and thx again !
 
Your process sounds good: this is an iterative process and you often have to combine several low order compensate filters with different corner frequencies.
It can be quite fast if you can rely on good measurements, and if your drivers are reasonably well behaved.

Oh, and I don't understand what you meant with "proper distance and gating"
Mic distance and measurement windowing/gating.

In the case of a band-pass, you might need two different measurements to address the high-pass (close range, long window) and the low-pass (further away, shorter window).

The high-pass is of course the most difficult one to address.
You want to get a clean stop-band, so you need sufficient resolution and low enough reflections. With HOLM, manually playing with the gating cursor should let you assert the best possible stop-band. I bet the same is possible with REW.

Additionally, you also want to get the lowest possible noise floor to be able to dig deep into the stop-band (ie further from fc), so you need to adjust levels accordingly to optimize the dynamic range (low hissing from drivers, high signal level, adjusted mic gain, ...)

You also need to carefully note the frequency at which the measurement stops being meaningful (either the slope getting too soft because of the windowing, or the noise floor starting to creep up) and avoid trying to correct past that mark, letting it derivative from flat.
Of course you absolutely don't want to flatten a compensated noise floor :D

Hope that makes sense :)
 
Your process sounds good: this is an iterative process and you often have to combine several low order compensate filters with different corner frequencies.
It can be quite fast if you can rely on good measurements, and if your drivers are reasonably well behaved.

Mic distance and measurement windowing/gating.

In the case of a band-pass, you might need two different measurements to address the high-pass (close range, long window) and the low-pass (further away, shorter window).

The high-pass is of course the most difficult one to address.
You want to get a clean stop-band, so you need sufficient resolution and low enough reflections. With HOLM, manually playing with the gating cursor should let you assert the best possible stop-band. I bet the same is possible with REW.

Additionally, you also want to get the lowest possible noise floor to be able to dig deep into the stop-band (ie further from fc), so you need to adjust levels accordingly to optimize the dynamic range (low hissing from drivers, high signal level, adjusted mic gain, ...)

You also need to carefully note the frequency at which the measurement stops being meaningful (either the slope getting too soft because of the windowing, or the noise floor starting to creep up) and avoid trying to correct past that mark, letting it derivative from flat.
Of course you absolutely don't want to flatten a compensated noise floor :D

Hope that makes sense :)

That all made great sense, big thanks !
Glad to hear I wasn't totally goofing up with compensate.

I work very hard to get as reflection free measurements as possible, but still as you say, the low freq is the tough nut ....even with best-efforts reflection-free testing ..

And I realize garbage measurements in, equals garbage tuning out.

I had not considered multiple low order compensate filters with different frequencies,... till now :)

SmaartLive, my go-to measurement software, is a very robust measurement platform. It accurately defines the time/phase info needed for measurement imports into rePhase that need the least phase adjustment.
I really think its multi-time-windowing FFT algorithms work better than gating for lower frequency measurement,...... it also gates for measurement comparisons.



Hey, rePhase ROCKS !
 
Hey Pos, your comment to use multiple low order compensations lit my mellon last night.
I finally get not to try to find 'one compensate fits all' for roll-off.

It's like you have designed/implemented whole new class(es) of IIR shelving filters.... built off xover typologies.

Very clever !!! :D
 
The one oactave overlapping 48db filter is by far my favorite and go to filter for horns to midbass . The SQ and ease of tuning is amazing. It works excellent!


And so far so good on the bass driver with 15.5ms . Still sounds great haven’t got sick of it at all. They compensate worked excellent, told me exactly what the box was doing along with the filter added.

Such a excellent software



So I’ve made some filters that have some bumpy side lobes .
They seem to sound good. When is side lobing considered too much in the lower stop band ?

If I have clean attenuation to -50db would that be okay? Or do I really want it to look clean all the way to the noise floor?
 
I really think its multi-time-windowing FFT algorithms work better than gating for lower frequency measurement,...... it also gates for measurement comparisons
frequency-dependent gating certainly is a good way of squeezing more information out of a single measurement, but it often cannot beat several measurements specifically tailored to a given frequency range.
For example you can analyse the lower frequency range of a driver with maximum resolution using a close range measurement, pushing reflections further away, but you will need more distance to get an accurate view of the higher frequency range, depending on the driver diameter.
 
So I’ve made some filters that have some bumpy side lobes .
They seem to sound good. When is side lobing considered too much in the lower stop band ?

If I have clean attenuation to -50db would that be okay? Or do I really want it to look clean all the way to the noise floor?
That is probably due to the rectangular windowing you are using.
-50dB should not be a problem though, unless you can localize a sub, etc.

Maybe try a slightly gentler windowing algorithm such as Hamming or Hann, and see if it sounds different?
 
frequency-dependent gating certainly is a good way of squeezing more information out of a single measurement, but it often cannot beat several measurements specifically tailored to a given frequency range.
For example you can analyse the lower frequency range of a driver with maximum resolution using a close range measurement, pushing reflections further away, but you will need more distance to get an accurate view of the higher frequency range, depending on the driver diameter.

Have you been able to compare multi-measurement stitching together, to relatively reflection free single measurements?

I use stitching when the weather is bad, but I feel I get more trustworthy measurements outdoors with speaker and mic on ground, at 4m distance.
Indoor close mic'ed sub measurements always seem a bit too good to be real.
 
Well, of course if you have access to (near) anechoic measurement conditions then things get easier :D
But then you don't need frequency-variable gating either :p

Re multiple measurements, to me it is not that much a matter of really stitching them together than it is of relying on one or the other when tackling specific frequency ranges: several measurements with different gating/smoothing processings, at different positions (distance and angles), etc.
 
Last edited: