Can you give one example of xover phase distortion that is easily audible in ABX with a musical signal : frequency, type, slopes, ...
Yes, what always works for me is the above mentioned track with LR24 acoustic xover somewhere between 250-2kHz
You can easily check this with rephrase by just correcting the phase of one xover point.
If you're not familiar with the effect yet, try a 48dB LR which is more easy to hear.
My experience is that transients will become short sweeps. (Pok will become pieuwww, just like with mp3)
Just like any effect that you are trained to hear, once you know what to listen to, you will always hear it. I myself am also very sensitive to phase with male vocals without music.
What I often use for checking purity of a signal is a recording made with a good omni mic, of the voice of a good friend. We are all so much trained on recognizing voices that you will immediately notice differences with the natural voice.
I have to admit that I am a trained professional (audio engineer and acoustician
), but the effect is very noticeable for anyone once you know what to pay attention to.
I for one am very sceptical about people making claims that phase at certain frequency ranges is not heard, I have done extensive abx testing with a group of friends who are all trained professionals, and 100 percent of them scores 100 once they know what to listen to, in the frequency range 30-8kHz.
In my opinion statistical tests with untrained listeners say NOTHING because we are all trying to achieve 'perfection' which cannot be judged by (with all respect) plumbers or carpenters, just as I am not capable of judging a perfect plumber job, I am at best capable of saying that it 'looks good'
Edit, statistical tests with untrained listeners have their merit, but only if you are developing a consumer mass product, like mp3... and you want to find out if people will accept the compromise
Kees
Last edited:
Yes that is exactly what I found!If you're not familiar with the effect yet, try a 48dB LR which is more easy to hear.
My experience is that transients will become short sweeps. (Pok will become pieuwww, just like with mp3)
I tried this once with an LR120 inverse correction with headphones, which makes it very obvious: as you say it makes percussive instrument sound like a slap on a water surface...
Once you put your finger on the effect it is easier to identify it for gentler real-world corrections...
I think everybody is able to tell the difference between a loudspeaker and a real person speaking in a room, but identifying exactly what the individual factors are demands some training...
Last edited:
Looking forward to your results 🙂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.
Hi Thierry
Code source of what? rePhase? You don't want to see it 😀
It is full of dirty tricks to make it run at a descent speed while keeping most of the code in Perl (which already makes it difficult to grasp for the unsuspected reader to start with), and also to make it easier/safer to compile.
Ah yes, and it also sniffs your personal documents and sends daily reports to the NSA
😉
What is it you want to see?
I can share algorithms, equations, methods, etc.
Code source of what? rePhase? You don't want to see it 😀
It is full of dirty tricks to make it run at a descent speed while keeping most of the code in Perl (which already makes it difficult to grasp for the unsuspected reader to start with), and also to make it easier/safer to compile.
Ah yes, and it also sniffs your personal documents and sends daily reports to the NSA

What is it you want to see?
I can share algorithms, equations, methods, etc.
Hello,
yes,it would be very interesting.
also,i was wondering if the iterations for optimization are made in the frequency domain.and so other curiosities.
I can share algorithms, equations, methods, etc
yes,it would be very interesting.
also,i was wondering if the iterations for optimization are made in the frequency domain.and so other curiosities.
An externally hosted image should be here but it was not working when we last tested it.
Yes I am also very interested in the algorithm you use for the optimization. Also I could provide you some pseudo code for the cepstrum method to create minimum phase filters from amplitude curves.
Kees
Kees
I am also interested to hear your opinion/experience with reflex port phase linearization, I am personally weary about the artifacts it brings (pre ringing)
Kees
Kees
The optimization process does an FFT of the generated impulse and calculates the differences in amplitude of the amplitude result curve compared to the amplitude target curve. It then internally modifies the amplitude target curve (but you don't see it on the screen) to take these deviations into account (and even exaggerate them for faster convergence, except for the "minimal" setting that only does one step), and recalculates a result impulse, and so forth...i was wondering if the iterations for optimization are made in the frequency domain.and so other curiosities.
At each iteration step the average deviation from target is calculated (with a fixed floor at -40dB and a B-weighting, to favor what is supposed to be the most important frequency and amplitude range), and the iteration are stopped when there has not been any gain for a given number of steps (depending on the optimization setting).
So the result amplitude curve will slowly converge toward the target curve, and sometimes the phase will get worse in the process (that might change in a future version...).
The arbitrary -40dB floor (everything below -40dB is ignored when calculating the average deviation) tends to let the ripples go up during optimization, and that will be changed in the next version (almost ready...) so the user will be able to set this floor to -80dB, etc...
So to sum up each iteration step looks like:
- IFFT of the target
- FFT of the result impulse
- comparison and deviation calculation
- stop if deviation is getting worse
- modify target
Hello,
Thank you for your work. Well done!
I am working on an open baffle project with DSP active crossover, based on Hypex DLCP. The crossover will use IIR filters and will boost the low frequencies to compensate for the open baffle loss. It looks like a good idea to me to correct the phase of the filters to get a linear phase, and I can do that with a convolution in JRiver before the crossovers.
After I tried rePhase I was wondering if you can add also and option for open baffles. I can not use the options for closed or vented designs you have as they have different responses.
I was also asking myself how I can correct the 6db/octave bass boost that I will use to compensate for the open baffle loss and I did not find an answer (it's a supplemental 6 db/octave LPF and a gain adjust for the subwoofer). If I want to experiment with crossovers that have a gap between LPF and HPF frequencies it will be also impossible to correct the phase using rePhase, as the interface allows only to specify crossover frequencies and not individual filters used in the crossover. I looked at Thuneau ant their Phase Arbitrator have the similar inputs as rePhase.
Probably being a programmer myself I found a solution: I can move the bass boost entirely into a convolution before IIR or I can use a cascade of convolutions to correct the phase of every component of the crossover. But this can be done from the begging in rePhase if instead of crossover frequencies one can input the components of the crossover one by one. What do you think about this?
Christian
Thank you for your work. Well done!
I am working on an open baffle project with DSP active crossover, based on Hypex DLCP. The crossover will use IIR filters and will boost the low frequencies to compensate for the open baffle loss. It looks like a good idea to me to correct the phase of the filters to get a linear phase, and I can do that with a convolution in JRiver before the crossovers.
After I tried rePhase I was wondering if you can add also and option for open baffles. I can not use the options for closed or vented designs you have as they have different responses.
I was also asking myself how I can correct the 6db/octave bass boost that I will use to compensate for the open baffle loss and I did not find an answer (it's a supplemental 6 db/octave LPF and a gain adjust for the subwoofer). If I want to experiment with crossovers that have a gap between LPF and HPF frequencies it will be also impossible to correct the phase using rePhase, as the interface allows only to specify crossover frequencies and not individual filters used in the crossover. I looked at Thuneau ant their Phase Arbitrator have the similar inputs as rePhase.
Probably being a programmer myself I found a solution: I can move the bass boost entirely into a convolution before IIR or I can use a cascade of convolutions to correct the phase of every component of the crossover. But this can be done from the begging in rePhase if instead of crossover frequencies one can input the components of the crossover one by one. What do you think about this?
Christian
Yes that would probably help 🙂Also I could provide you some pseudo code for the cepstrum method to create minimum phase filters from amplitude curves.
Kees
I am not using Matlab or any symbolic math library underneath so everything has to be implemented "by hand" (I am using an FFT library though...).
I am also interested to hear your opinion/experience with reflex port phase linearization, I am personally weary about the artifacts it brings (pre ringing)
I am using it and tend to like it, but that is only my opinion based on limited experience and without any statistical validation 😀
What artifacts do you hear?
Bohdan has written some doc about it (linearizion of its McCauley subs) that can be get on his website:
http://www.bodziosoftware.com.au/Home_Theatre_Conclusions.pdf
http://www.bodziosoftware.com.au/Attributes_Of_Linear_Phase_Loudspeakers.pdf
JMLC expressed some concerns about the audibility of low frequency preringing throughout the rest of the spectrum because of IMD.
One thing for sure: as you are well positioned to know almost all studio loudspeakers have phase shifts down low caused by BR (most of the time) or sealed (NS10, auratone...) enclosures. Sound engineer are making decisions based on what they hear with these tools, so removing the phase shift will change the sound to something that was maybe not wanted...
Maybe correcting half of the BR phase shift and make its phase look like a sealed system would be a good compromise, as people often report liking sealed system better than BR ones because of bass lagging...
High Q BR will probably benefit the most.
Last edited:
Hi Christian
Though, are you sure you need to compensate this boost? If this baffle loss is a minimum-phase phenomenon (and I imagine it is) then a minimum-phase EQ such as the IIR you are using in the DLPC will compensate both the amplitude and the phase in the same time, and give you a minimum-phase response as if there was no baffle loss.
You can choose to use asymmetrical electric filters to take natural rolloff of drivers into account, but the result shall always be a complementary and coherent acoustic filter (electric+natural rolloff), with time alignment based solely on geometrical position of the drivers using delays (some passive designs compensate this with asymmetrical filters, but in digital domain delays are much better fitted to the task, or better yet: a real geometrical alignment that will be valid at any angle...).
This is the best way to do crossovers, regardless of phase-linearizartion is used or not.
So all in all you should end up with symmetrical LR slopes (the easiest complementary and coherent shape to obtain with IIR filters), even if you are using different electrical filters with different cutoff as well as EQ.
(The exceptions to this are odd-order butherworth (acoustic) crossovers that sum with quadrature phase, but their phases shifts are still coherent with a 90° shift, and the amplitude is complementary when that shift is taken into account)
You cannot linearize on the stereo signal a system that is not coherent in phase to start with...
You can use the paragraphic phase EQ to compensate for any specific phase shift (it is primarily meant for fine-tuning filter linearization, but can also be used as-is).I am working on an open baffle project with DSP active crossover, based on Hypex DLCP. The crossover will use IIR filters and will boost the low frequencies to compensate for the open baffle loss. It looks like a good idea to me to correct the phase of the filters to get a linear phase, and I can do that with a convolution in JRiver before the crossovers.
After I tried rePhase I was wondering if you can add also and option for open baffles. I can not use the options for closed or vented designs you have as they have different responses.
I was also asking myself how I can correct the 6db/octave bass boost that I will use to compensate for the open baffle loss and I did not find an answer (it's a supplemental 6 db/octave LPF and a gain adjust for the subwoofer).
Though, are you sure you need to compensate this boost? If this baffle loss is a minimum-phase phenomenon (and I imagine it is) then a minimum-phase EQ such as the IIR you are using in the DLPC will compensate both the amplitude and the phase in the same time, and give you a minimum-phase response as if there was no baffle loss.
rePhase or Phase Arbitrator (which was an inspiration for rephase) only compensate for *acoustic* crossovers, which are necessarily composed of amplitude-complementary and phase-coherent filters.If I want to experiment with crossovers that have a gap between LPF and HPF frequencies it will be also impossible to correct the phase using rePhase, as the interface allows only to specify crossover frequencies and not individual filters used in the crossover. I looked at Thuneau ant their Phase Arbitrator have the similar inputs as rePhase.
Probably being a programmer myself I found a solution: I can move the bass boost entirely into a convolution before IIR or I can use a cascade of convolutions to correct the phase of every component of the crossover. But this can be done from the begging in rePhase if instead of crossover frequencies one can input the components of the crossover one by one. What do you think about this?
You can choose to use asymmetrical electric filters to take natural rolloff of drivers into account, but the result shall always be a complementary and coherent acoustic filter (electric+natural rolloff), with time alignment based solely on geometrical position of the drivers using delays (some passive designs compensate this with asymmetrical filters, but in digital domain delays are much better fitted to the task, or better yet: a real geometrical alignment that will be valid at any angle...).
This is the best way to do crossovers, regardless of phase-linearizartion is used or not.
So all in all you should end up with symmetrical LR slopes (the easiest complementary and coherent shape to obtain with IIR filters), even if you are using different electrical filters with different cutoff as well as EQ.
(The exceptions to this are odd-order butherworth (acoustic) crossovers that sum with quadrature phase, but their phases shifts are still coherent with a 90° shift, and the amplitude is complementary when that shift is taken into account)
You cannot linearize on the stereo signal a system that is not coherent in phase to start with...
Last edited:
Though, are you sure you need to compensate this boost? If this baffle loss is a minimum-phase phenomenon (and I imagine it is) then a minimum-phase EQ such as the IIR you are using in the DLPC will compensate both the amplitude and the phase in the same time, and give you a minimum-phase response as if there was no baffle loss.
No, I am not sure. I will know after the measurements.
The exceptions to this are odd-order butherworth (acoustic) crossovers that sum with quadrature phase, but their phases shifts are still coherent with a 90° shift, and the amplitude is complementary when that shift is taken into account
This is exactly what I had in mind, to use a 3rd order Butterworth for the LPF for low frequencies at around 120 Hz (the baffle frequency), that will add with the 1st order LPF at 30-40 Hz for baffle compensation (and of course with the extra gain of the low frequency amplifier). The HPF for the mid will be a 4th order and I hope to get an acoustic 4th order crossover. But I would like to control the phase as best as possible for low frequencies and I will experiment with phase correction after the first measurements.
If you have a real *acoustical* 3rd order Butt crossover, with -3dB at 120Hz and 90° phase difference all around between LP and HP, then you can linearize the phase of its sum with a LR12 phase linearization at 120Hz.
Last edited:
The optimization process does an FFT of the generated impulse and calculates the differences in amplitude of the amplitude result curve compared to the amplitude target curve. It then internally modifies the amplitude target curve (but you don't see it on the screen) to take these deviations into account (and even exaggerate them for faster convergence,
So the result amplitude curve will slowly converge toward the target curve, and sometimes the phase will get worse in the process (that might change in a future version...).
So to sum up each iteration step looks like:
- IFFT of the target
- FFT of the result impulse
- comparison and deviation calculation
- stop if deviation is getting worse
- modify target
Hi pos,
Thanks for explanations.
if optimizations are done in the frequency domain,why processing an IFFT of the target ?
ok i understand the mean of modified target and curve needed.
Can we have access to algorithms and methods ?😛 (or via PM).

Last edited:
That's right, the optimization is done in the frequency domain, but the constraints are set in the time domain: length, centering and windowing of the impulse.
That is why repeated iterations of IFFT/FFT have to be done to check what effects those constraints will have on the frequency domain, and what can be done to compensate for them.
As for algorithm sharing no problem as already said, but I can only share pseudo code and explanations because the real code is buried into optimizations and implementation-specific tricks that will render it meaningless.
What are you interested in?
That is why repeated iterations of IFFT/FFT have to be done to check what effects those constraints will have on the frequency domain, and what can be done to compensate for them.
As for algorithm sharing no problem as already said, but I can only share pseudo code and explanations because the real code is buried into optimizations and implementation-specific tricks that will render it meaningless.
What are you interested in?
Ok,each step consist to an FFT/IFFT to keep max. phase and min. phase to optimize the taps available.
just the source code !🙂
i wanna know how to define some parameters and the great work with the independant phase/magnitude algos.
Thierry.
As for algorithm sharing no problem as already said, but I can only share pseudo code and explanations because the real code is buried into optimizations and implementation-specific tricks that will render it meaningless.
What are you interested in?
just the source code !🙂
i wanna know how to define some parameters and the great work with the independant phase/magnitude algos.
Thierry.
Not sure I get what you mean. The amplitude target is modified to compensate for what is lost/modified between the original target (blue curve) and the result calculated with an FFT of the impulse (red curve).Ok,each step consist to an FFT/IFFT to keep max. phase and min. phase to optimize the taps available.
That is not going to happen I'm afraidjust the source code !🙂

It is fazirly simple really :i wanna know how to define some parameters and the great work with the independant phase/magnitude algos.
- The amplitude and phase curves are set with equations (for example textbook responses from LR filters, or from biquads response calculations for some minimal-phase EQs. I can share those if you want, but they can be found on the web pretty easily). This is the blue curve.
- The amplitude and phase response is calculated for each frequency point of the target FFT/IFFT
-The coefficients for the IFFT are calculated based on these values, and the impulse is generated and subsequently centered based on energy and windowed
- An FFT of the final windowed impulse is done and the amplitude/phase value for each frequency point is extracted. This is the red curve
And of course the optimization process will repeat the process several times, adding correction to the value of each frequency point of the amplitude target curve.
Of course there are a couple of tricks in the process, but it is how it works basically.
Last edited:
rePhase 0.9.7 is out: http://sourceforge.net/projects/rephase/
Code:
0.9.7 2013-09-03
- Brickwall filters implementation.
/!\ result slope relies solely on windowing /!\
Iterative optimization and energy centering algorithms are
automatically defeated when a brickwall filter is set, to make it
possible to build complementary crossovers. It is up to the user to
make sure he uses the exact same number of taps and same windowing
algorithm on both sides of the crossover to ensure complementarity
- sampling rate drop down menu can now also be directly edited to input
arbitrary values, so menu options have been reduced to the most
common values for clarity and ease of use
- frequency, amplitude and phase ranges can now also be set to
arbitrary values
- optimization floor can now be set (was -40dB fixed)
- B-weighting in optimization calculation was removed (for now)
- new amplitude paragraphic presets with fixed frequencies (1kHz) for
various Q values (0.5, 1, 2, 4, 8, 16)
- got rid of scientific notation in txt output format to broaden
compatibility
- dark graph theme
- various graphical bugs resolution
- C float array output formats
- filename encoding bugfix: accents and other special characters
handling in setting and measurement filenames
- "reject" filter slopes bugfix
- "Save Settings" menu option
- "Save modifications" dialog box before loading/resetting/exiting
- window title now shows the settings name instead of the impulse name
- updated 'tips' in Linearization and filtering tabs
Thanks POS for the new version
I'm still testing with mine. So far it hasn't done any harm, but I'm not sure it's a huge improvement, either. 🙂 The differences are subtle, to my ear. I've tried correcting just the box HP filter, and also the box with the crossovers. Wanting to hear what each part does.
Hope to have a report soon.
I'm still testing with mine. So far it hasn't done any harm, but I'm not sure it's a huge improvement, either. 🙂 The differences are subtle, to my ear. I've tried correcting just the box HP filter, and also the box with the crossovers. Wanting to hear what each part does.
Hope to have a report soon.
- Home
- Design & Build
- Software Tools
- rePhase, a loudspeaker phase linearization, EQ and FIR filtering tool