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

The filters would be the deltas between the excess phase plot and a flat line.

You can do something like this directly in REW if you want to.

Here is an example using the synthetic LR4 2500 from before

Basic aligned sum with flat SPL but changing phase from the crossover

attachment.php


Excess Phase version 0dB SPL but changing phase

attachment.php


By Using the 1/A function in Trace Arithmetic (All SPL) you get an inverse response

attachment.php


If you then convolve the inverse response back with the original you get flat SPL and phase

attachment.php


The inverse filter response can be exported from REW as a wav file for use as a convolver filter, the length will be long if the response is not windowed before export.

This is a complete inverse which may or may not be a good idea 🙂 And is related to what pos wrote above about the measurement being correct.

For a more automated correction where limits and windows can be chosen DRC_FIR is a good free program. There is good thread here if you are interested in that A convolution based alternative to electrical loudspeaker correction networks
 

Attachments

  • Aligned Sum.jpg
    Aligned Sum.jpg
    112.3 KB · Views: 543
  • Aligned Sum EP.jpg
    Aligned Sum EP.jpg
    113.7 KB · Views: 415
  • Inverse.jpg
    Inverse.jpg
    112 KB · Views: 411
  • Result.jpg
    Result.jpg
    114.7 KB · Views: 399
You can do something like this directly in REW if you want to.

Here is an example using the synthetic LR4 2500 from before

Basic aligned sum with flat SPL but changing phase from the crossover

Excess Phase version 0dB SPL but changing phase

By Using the 1/A function in Trace Arithmetic (All SPL) you get an inverse response

If you then convolve the inverse response back with the original you get flat SPL and phase

The inverse filter response can be exported from REW as a wav file for use as a convolver filter, the length will be long if the response is not windowed before export.

This is a complete inverse which may or may not be a good idea 🙂 And is related to what pos wrote above about the measurement being correct.

For a more automated correction where limits and windows can be chosen DRC_FIR is a good free program. There is good thread here if you are interested in that A convolution based alternative to electrical loudspeaker correction networks

That is very cool. I didn't know a .wav file is directly applicable to the convolution engine. The only problem is trying to add the XO and frequency SPL filters to it.

I need to update my aging PC. I can run 6 simultaneous filters with headroom, but 8 or more is pushing it.
 
Last edited:
You can combine them all into one inside REW if you want to by importing them as wav files and then using trace arithmetic to convolve them together then windowing the final version to set the filter length you want or need. Bearing in mind that if you window too far you might change the filter response.

Which corrections you want in which channels is up to you 🙂

There are other ways to do the same thing with other software, just depends on what you have or prefer to use.

wav files can contain 32 bit float which is what most convolvers use in one form or another.
 
You can do something like this directly in REW if you want to.

Here is an example using the synthetic LR4 2500 from before

Basic aligned sum with flat SPL but changing phase from the crossover



Excess Phase version 0dB SPL but changing phase



By Using the 1/A function in Trace Arithmetic (All SPL) you get an inverse response



If you then convolve the inverse response back with the original you get flat SPL and phase



The inverse filter response can be exported from REW as a wav file for use as a convolver filter, the length will be long if the response is not windowed before export.

It's probably worth noting that the same inverse phase response generated by the 1/A function in REW's Trace Arithmetic,
could be done directly in rephase with Filters Linearization of a 24dB/oct LR4 at 2500Hz.

Much simpler, more direct.... with less chance of error than using REW with the additional trace arithmetic steps, and then setting export window size & sample alignment .........imho.
 
It's probably worth noting that the same inverse phase response could be done directly in rephase with Filters Linearization of a 24dB/oct LR4 at 2500Hz.
If you only want to generate the inverse of a known LR filter then filters linearization is the simple way. Someone asked for automation, of paragraphic phase EQ which suggests a much more complicated inverse hence the other method. The example was not meant to be taken literally 😉
 
If you only want to generate the inverse of a known LR filter then filters linearization is the simple way. Someone asked for automation, of paragraphic phase EQ which suggests a much more complicated inverse hence the other method. The example was not meant to be taken literally 😉

Fluid,

I played around with making the 1/A plot and then the A*(1/A) to get a flat line from some of my existing measurements.

I noticed depending on the windowing selected, the 1/A results generated inverse SPL peaks/nulls which appear to be significantly higher than the original. I can see from those peaks/nulls that it could invoke some cuts/boost higher than one would want. Very cool none the less.
 
Last edited:
A true numerical inversion like that can produce some pretty wild corrections which is why I said to watch out. Windowing, smoothing and averaging can all help whether it is a good or bad idea is very situation dependent.

I made a thread a while ago where I used some different tricks to get around those issues with a virtual EQ of the JBL LSR 305mkii maybe it is useful if you haven't seen it
JBL LSR 305P MKii EQ Based on ASR Klippel Measurements
 
I've been trying to wrap my head around something in rePhase and am looking for some input to increase my understanding.

I am trying to linearize phase of a crossover using a miniSHARC. The mid has a LR4 60 Hz LPF and a LR16 2000 Hz HPF. The tweeter has a LR16 2000 LPF.

When I look at the correction filter that RePhase generates I notice that it appears to "subtract" phase. As a result the corrected phase appears to be a flat -1440 deg for the tweeter and a flat -1800 deg for the mid.

How do I interpret this 360 deg offset? My first pass interpretation would be that the mid will be one cycle behind the tweeter at all frequencies but I am not sure that is correct. If this is the case a delay really won't help and the only way I can think to get similar phase response would be to tack on a LR4 60 Hz LPF to the tweeter and linearize that (which would obviously greatly increase the amount of taps needed for the tweeter).

Any thoughts? I feel like I must be thinking about this incorrectly.

Michael
 

Attachments

  • tweet-lr16-2000.jpg
    tweet-lr16-2000.jpg
    330.6 KB · Views: 81
  • mid-lr16-2000-lr4-60.jpg
    mid-lr16-2000-lr4-60.jpg
    344 KB · Views: 80
Thought about my previous post and I think I just confused myself even more 🙂.

The numbers quoted in my previous post did not account for the fact that the HPF phase will be 0 at high frequencies and will increase at lower frequencies but the LPF will be 0 at low frequencies and will decrease at higher frequencies.

To me this would suggest that the phase offset would be even greater as the corrected tweeter would have a flat phase response of 0 deg and the mid would have a flat phase response of -1440 deg. As I can't think of any easy way to correct this I feel like this must be a non-issue and I must not being thinking about this correctly.

Michael
 
If you change linearize to rotate in rephase it will show you the phase lag being created by those filters, 1800 degrees positive. If you then add the same filters with linearize you will get back to 0 degrees.

The point of the linearization is to undo the positive phase caused by the filters so it has to be negative to do that.
 

Attachments

  • Rotate.jpg
    Rotate.jpg
    264.8 KB · Views: 81
I think you may have posted prior to my second post was cleared by the mods (long time lurker, just started posting recently).

Won't the LR16 HPF (tweeter) phase have a range of +1440 / 0 and the LR16 LPF and LR4 HPF (mid) phase have a range of +360 / -1440 (see attached images)? And after correction the tweeter will be at 0 deg and the mid be at -1440 deg?

What I am missing?

Michael
 

Attachments

  • mid.png
    mid.png
    285.5 KB · Views: 222
  • tweet.png
    tweet.png
    258.7 KB · Views: 224
I did post before I saw your second one, now I'm not sure what you don't understand and I'm sure what I posted didn't help 🙂

Here is a simulation of the uncorrected response and then the linearized one. The uncorrected response goes from -1260 to plus 360.

When it is linearized it comes out fairly flat at -1440.

A flat phase with positive or negative number is just a time offset, in this case if it was removed the phase would show as trending to 0.

Maybe that helps?
 

Attachments

  • Phase Uncorrected.jpg
    Phase Uncorrected.jpg
    277.7 KB · Views: 201
  • Linearized.jpg
    Linearized.jpg
    277.7 KB · Views: 202
Rephase can generate the FIR filter based on an REW export of filters or other methods but you then need a convolver of some kind to apply that filter to the audio in realtime, so whatever software or hardware you have to apply the EQ would likely determine the best method to use.
 
I need something that will do DSP on the input stream from the mic, I only found stuff for correcting speakers.

I want to be able to choose between the raw mic and the DSP corrected mic as an audio device in any given program which supports a microphone.

I can do this on Linux but haven't found a Windows solution.
 
Hi everyone.
I'm a newbee to this forum with some Rew, & MSO experience.
I use Reqw for sweeping , and then MSO for Dual sub optimisation & Sub+Main as Global PEQ in Minidsp 2*4 HD.
I'm trying to understand a bit about FIR option in Minidsp HD.
Is there a possibility to use the FIR option for phase optimisation along with parametric PEQ as IIR in Minidsp HD using tools like rephase along with REW?
I'm bit familiar with MSO as well. MSO is very good tool, but to my knowledge it's not good for phase optimisation.

I'm using IIR PEQ's for dual sub room PEQ's and for Global PEQ Subs+Mains optimisation mainly from, 17 to 150 Hz. Now trying to understand if it is possible to combine IIR PEQ's + FIR (mainly for phase correction)?

All ideas /advice will be appreciated.

I will read the forum slowly , but in the same time if any help on the topics wil be appreciated.

BR
JIJI N K


Minidsp%20HD%20FIR%20option.jpeg
 
Could RePhase be used to apply a REW correction to a microphone in realtime or is there another program more suited to that?

I need something that will do DSP on the input stream from the mic, I only found stuff for correcting speakers.

I want to be able to choose between the raw mic and the DSP corrected mic as an audio device in any given program which supports a microphone.

I can do this on Linux but haven't found a Windows solution.

For example this interface (link: Motu M4 Audio Interface Review | Audio Science Review (ASR) Forum) locked at 192 or 96kHz controlled by Jriver, use Rephase to dial the reverse minimum phase curve of your microphone and set that filter string into Jrivers DSP engine and use a one click to bypass the container where filter string sits, pretty shure it would work but there is a tiny inherent propagation delay using USB routing.
 
Last edited:
Is there a possibility to use the FIR option for phase optimisation along with parametric PEQ as IIR in Minidsp HD using tools like rephase along with REW?
Yes you can combine PEQ and an FIR but the HD is tap limited and runs at 96K sampling so there is not much in the way of resolution at low frequencies.

I'm bit familiar with MSO as well. MSO is very good tool, but to my knowledge it's not good for phase optimisation.
Most issues being corrected are minimum phase in nature and therefore the phase is corrected at the same time as the amplitude by an IIR filter.

If you know the crossovers that are used in your speakers or can take quasi anechoic measurements then you can use filters linearization to undo the phase turn of non linear phase crossovers.

When you go beyond that you need to know how and what you are measuring to decide what should be corrected or left alone. If you don't have that knowledge leave it alone or experiment to see what the effects are.