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

Thanks pos.

I have made a small program to convert the text file to a c array, you can postpone that improvement for some time.

The FIR accelerator is in time domain, so the window thing doesn´t really apply I believe. Or does the window parameter affect the generated impulse?
 
A few months ago, the use of rePhase for correcting the phase effects of bass reflex alignments was discussed, concluding that it would be possible to make a bass reflex speaker behave like a sealed speaker (I think I even stipulated phase and transient response in a question) by reversing the measured phase shift near the port resonance. Is this really true?

If a bass reflex port augments the movement of the cone with an in-phase resonance delayed by one waveform period (referred to as 'time smearing' by Wikipedia's bass reflex article), it looks as though whatever we do to undo the delay in the port's output must also lead to premature output from the cone. Theoretically we can deconvolve the driver's signal with whatever it has been convolved with, but only if the system is minimum phase. Is this actually an example of a non-minimum phase system, so it is not possible to remove the time smearing effect of the bass reflex port?
 
Last edited:
I got a question:
checking the phase plot of the generated IR i see that with many different windowing functions the phase in the stopband is jumping back and forth between 0 and 180°.

I think this could be related to Gibbs phenomenon: the undershoots of amplitude ripples are reported as positive in the pseudo magnitude graph but with inverted polarity....is that right? (just guessing)

why some windowing functions doesn't have this behavior? for example triangular, or barlett-hann are flat phase even in the stopband.

Complex window is so strange... can't figure out the phase behavior in the stopband...

thanks to anyone that will make me scratching my head :)

An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.
 
*i meant "stop scratching" in the previous post...
...furthermore if anyone has problems in expanding the thumbnails...here are the full sized

An externally hosted image should be here but it was not working when we last tested it.

An externally hosted image should be here but it was not working when we last tested it.

An externally hosted image should be here but it was not working when we last tested it.

An externally hosted image should be here but it was not working when we last tested it.

An externally hosted image should be here but it was not working when we last tested it.
 
Last edited:
Hi luigichelli

Thanks for these interesting illustrations :D

As a side note, it should be noted that only 384 taps are used, and the target slope is quite steep: this side of the "reject low" shape is far sharper than the advertised 48dB/oct. A shallower target curve, LR 48 or 96dB/oct for example, would give lower ripples for the same number of taps.
To compare ripples with different windowing algorithms you should probably stick to LR shapes as those are more common and predictible (the "reject low" hipass is almost brickwall half an octave under its cutoff).
Also if you really want to compare windowing algorithms you should defeat the iterative optimization stage (optimization: none) as it will iteratively change the amplitude target target to make the result curve match the initial target better and better, but will sacrifice phase to do so, and also tend to rise the ripple floor (optimization concentrates of the > -40dB SPL range, but this will be settable in the next version).
With the current version you will obtain lower ripples when setting optimization to "none".

Regarding the "complex" windowing, it was meant for phase-only corrections before the "float" centering option was introduced, to avoid amplitude ripples in the HF (but they still appear in the impulse...).
It splits the audio band in two and apply different windowing on the LF and HF, and also different windowing on the left side and the right side of the impulse...
It should only be used when the "int" centering method has to be used (and generally it should not), and preferably for phase corrections only...
 
Hi all

Just a quick update to bring to your notice a nice tutorial recently put together by the miniDSP team:
The rePhase FIR tool | MiniDSP

By the way, following this advice, could a moderator please change the title of this thread as follow:
rePhase, a loudspeaker phase linearization, EQ and FIR filtering tool

Thanks!
(yes, I know this thread should not be in the multiway section, but please leave it here, as it is the only section I really follow and have my habits with :D )
 
Hi luigichelli

Thanks for these interesting illustrations :D

As a side note, it should be noted that only 384 taps are used, and the target slope is quite steep: this side of the "reject low" shape is far sharper than the advertised 48dB/oct. A shallower target curve, LR 48 or 96dB/oct for example, would give lower ripples for the same number of taps.
To compare ripples with different windowing algorithms you should probably stick to LR shapes as those are more common and predictible (the "reject low" hipass is almost brickwall half an octave under its cutoff).
Also if you really want to compare windowing algorithms you should defeat the iterative optimization stage (optimization: none) as it will iteratively change the amplitude target target to make the result curve match the initial target better and better, but will sacrifice phase to do so, and also tend to rise the ripple floor (optimization concentrates of the > -40dB SPL range, but this will be settable in the next version).
With the current version you will obtain lower ripples when setting optimization to "none".

Regarding the "complex" windowing, it was meant for phase-only corrections before the "float" centering option was introduced, to avoid amplitude ripples in the HF (but they still appear in the impulse...).
It splits the audio band in two and apply different windowing on the LF and HF, and also different windowing on the left side and the right side of the impulse...
It should only be used when the "int" centering method has to be used (and generally it should not), and preferably for phase corrections only...

Thanks a lot for your advices, i see now that one a much better ripple rejection could be traded for a bit of steepness (for example going to lr 48 or 96).
anyway my question came from the analysis of various filters, expecially a plugin (waves linear phase eq, in the following image) that is showing noticeable ripple in the stopband region. I always thought that Linear phase filters were "linear phase" for both the stopband and the passband, but i saw that the rippling region is behaving in a different in many cases (with the exception of barlett and barlet hann that has almost no rippling)!

An externally hosted image should be here but it was not working when we last tested it.

An externally hosted image should be here but it was not working when we last tested it.
 
Dear pos,
Thanks for making this Great tool available!
I have one request, it would be very Nice to have the option to export the filters also als minimum phase (doable via hilbert transform or cepstrum method) . This way we could listen to the differences.

Thanks again,
Kees

to export minimum phase impulse,choose the inv time in the general tab.
Thierry,
That function will reverse the time scale, and will indeed make it possible to somehow build minimum-phase filters by reversing the phase linearization, but I don't think that is what Kees is after.

Kees,
The paragraphic EQ tab already has the option to switch between minimum and linear phase for some EQ types, but it would indeed be nice to have it also for some Filter types (with restrictions in slope selection).
You idea of having an addiotnal option to "force" the phase behavior to minimal phase is very interesting, and I will make my best to include it in some future version. That could be a 3-choices drop menu in the impulse setting tab: "minium-phase" to enforce minimum phase relation with the amplitude curve, "linear-phase" to force the phase to 0 (that one is pretty straightforward to implement :p), and "arbitrary" (or "target", or whatever) which would be the current behavior of following the target phase curve.

This would not be a solution to all problems though, as one can use phase EQ to linearize the phase of a driver within its range, and then apply linear-phase filters, and turning everything to minimum-phase would not lead to a phase-coherent system anymore...
In this case the option to only force filters to would be the solution.
Anyway, lets try to implement both :D
 
anyway my question came from the analysis of various filters, expecially a plugin (waves linear phase eq, in the following image) that is showing noticeable ripple in the stopband region. I always thought that Linear phase filters were "linear phase" for both the stopband and the passband, but i saw that the rippling region is behaving in a different in many cases (with the exception of barlett and barlet hann that has almost no rippling)!

That comes from the "F" in FIR ;)
All windowing algorithms are a compromise but in most case if you have a descent enough amount of taps for the task at hand you will always find a solution: out of band phase behavior is not a problem when you are in the stop band and the amplitude is already 50dB down...

Anyway, that is why rePhase let you try different windowing algorithms and judge the effect on the result curve for yourself.

As a side note, the effect of rounding errors when the amplitude is very low will also become apparent when exporting a low resolution impulse: for example if you export a 16bit wav impulse and load it in your measurement software you will see even greater phase shifts out of band (and also possibly amplitude ripples higher in level) than what rePhase (or a txt 32bit float export) had shown you.
 
Last edited:
luigichelli,

Additionally, if you use HOLM you will see that it has a "hide phase below XX" option, that is set at -50dB by default (if I remember correctly, would have to check on a fresh install...).
rePhase also has this option, but it is set to -inf by default.
Setting this to -50dB or -80dB by default would make sense though, as rounding errors make phase calculation difficult, and phase will have no practical meaning at these levels anyway.
What is important is that when properly summed in a crossover, two complementary linear-phase filters will give a linear-phase response and a flat amplitude, even if their phase gets weird down low...
 
Hey Pos. I'm listening to my system right now "Rephased". It's interesting and subtle. So far, I like it. Going to continue with listening test and do some blind ABX tests to hear if I can really detect the correction.
"Interesting and subtle", isn't it what high fidelity is all about ? :p
What are you corrected crossover frequencies? Are you also correcting the BR?

By the way, thanks for the thread renaming
 
My experience with linear phase is that it is very noticable with percusive instruments. Especially Hand percussion and wel recorded piano gives me a 100 percent score in abx testing.
This is true for xovers at any frequency, though I am not so sure about the effect of br port compensation, I have the feeling that I am hearing pre ringing in this case, which could be true since the system is not causal anymore.
I have tried linear phase on many systems, mainly studio monitors. (My benchmark system is my genelec 8050's in a mastering studio)

I can especially recommend the track "hearts and bones" by Paul Simon and then the last minute of it.
Kees
 
My experience with linear phase is that it is very noticable with percusive instruments. Especially Hand percussion and wel recorded piano gives me a 100 percent score in abx testing.
This is true for xovers at any frequency
Can you give one example of xover phase distortion that is easily audible in ABX with a musical signal : frequency, type, slopes, ...
 
Administrator
Joined 2004
Paid Member
Hey Pos. My acoustic crossover points are 650Hz, 4th order Bessel and 6000hz 5th order Butterworth. Box is more or less ported at ~32Hz. Your box correction and LR 4th worked well to straighten the phase. For whatever reason, adding the 6KHz crossover point didn't seem necessary. Just those 2 presets did a good job, then I went in and tweaked by hand. I used the full spectrum phase EQ, then further tweaks in bass, midrange and highs.

I made a left and right impulse, then combined them into a stereo file, 24 bits. The files were trimmed to get the left & right impulses aligned. I use the convolver function in JRiver Media center. No frequency response EQ, just phase.

So far the Rephased sound seems more focused, more laid back. Not quite what I expected, but I like it. Will do some blind tests later this week.