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

This is the problem with wanting automation, the algorithm has to be able to account for every possibility and work out the best solution. This is difficult to do often fails and the reason why "room correction" products have a bad name in certain circles.

To avoid over correction the algorithm has to play it safe and this is not always the best solution.

Rephase does not need to do the things you are asking for they are already available in free software and paid commercial code.

DRC_FIR is free and completely customisable which is what can make it daunting as you can change everything for better or worse. It does what pos suggests which is an inversion but with limits on how or if the dips are filled and limits on the corrections applied to the very limits of the frequency ranges to avoid the problems he listed.

Acourate and Audiolense are commercial codes that get it right and are quite flexible and hold your hand a little more throughout.

What is key to all of these is the settings of the frequency dependent window on which the corrections are based.

The one size fits all of basic Dirac is not the best way to go for anyone who has half a clue of what to change.
 
I also often see measurements with wrong polarity imported into rephase (with the well recognizable phase shape on top). That cannot be considered a valid base for any phase correction, let alone an automated one!
......
A properly measured loudspeaker (for a given frequency range) should produce a measurement that is easy to cleanup (gating and/or smoothing, preserving what is important, with correct polarity and delay compensation), the phase of which would in turn be easy to linearize using one or two "filter linearization" entries, and maybe a tad of phase EQ...

..
What is criteria based on what can be decided, that measurement polarity is correct?
Highest impulse peak is on positive side, or fist impulse peak? Or something else?

What can be wrong (measured or other) when after correct "filter linearization" entries in rePhase (when linearizing filter with imported measurements) phase is nearly direct line, except one 360 degree turn on frequency between filter frequencies?
 
@Oabeieo,
I agree wholeheartedly with fluid's response here. With DRC-FIR + Rephase combined you would already have everything you mentioned on your wish list (and probably more). Fully adjustable (which might be a problem at first) and completely open. The biggest problem left is going to be to learn what it is you want it to do. Knowing what and also when to correct.

If you learn how to use the above combination (for instance with REW combined), Dirac isn't any real competition i.m.h.o. Mostly because that one is closed source, non user adjustable. It might be a perfect tool for users that don't want to fiddle as much and deserves its place.

Once you know/learn what you want out of it, there are more suitable solutions.

Besides the already mentioned Acourate and Audiolense, which are more automated tools compared to DRC-FIR, there are several other solutions available. APL_TDA is another available suite, which I would also put above Dirac, but is another closed up solution. In other words, the solutions are out there already. Pick the one that fits your needs.

If you don't get out of it what you wanted or expected, don't blame the tools. They merely do what you ask them to do. ;)
 
Last edited:
I also noticed that different FDW settings in REW give very different results.
What is best FDW in REW for rePhase?

A difficult question to answer, if you don't mind, i'll give it a try:

In all honesty, that would depend on lots of factors. There may not be a right answer that fits all. One might need different window lengths at different frequencies for best practices, it all depends on speaker+room and what measurements were used to start with.

For instance, in a reflective environment I would use the (vector) average of several measurements (*). That would ensure a less position dependent correction, getting rid of 'point specific' reflections.

In a less reflective room and depending on the speaker used, I would go for a measurement set at a single (sweet) spot. And verify the correction at other points of interest.

Both the above might benefit from different window lengths. Use anything ranging from 4 cycles up to 6 to play it 'relatively' safe. There are no guarantees, it would help to learn how to 'read' the room. That's why there are so many different views in REW, they all serve a purpose. All are a different view of the same data, the IR.

(*) Even creating an average of several measurements can be done differently, depending on what to want or to expect.
 
Last edited:
Room has next RT60, measured 2,6 m form speaker, FWD is "with in cycles 10", speakers are active 3-way OB, filters also made in rePhase. Measurement is made after my initial rePhase+REW correction.
 

Attachments

  • RT60Dacay.png
    RT60Dacay.png
    352.2 KB · Views: 168
Last edited:
10 Cycles is quite a lot of time, to let the reflections in. OB is going to have reflections, not the early ones from side walls, but that back energy is coming from the room at some point in time. To get an idea about the first wave front that hits our ears, I usually use a waterfall like that, but way shorter. Something like:

waterfall-latest.jpg


Combined with a Specrogram, to check the timing, but that view is also very dependent of what setting you use.
An example of it of my speaker pair:
attachment.php
 

Attachments

  • Stectogram.jpg
    Stectogram.jpg
    277.9 KB · Views: 290
Last edited:
But I can test same taps FIRs tomorrow, currently I already using middle centering.
I made other test where bass and mid FIR had both 100 000 taps, mid delay is changed accordingly.
Result is same, brown line where bass FIR is inverted, mid direct; blue when mid is inverted and bass is direct.
Added also SPL line, color coding is same, green is when bass and mid both are direct and impulse in green when both are direct.
 

Attachments

  • Impulses100k.png
    Impulses100k.png
    74.7 KB · Views: 124
  • SPL100k.png
    SPL100k.png
    73.9 KB · Views: 61
  • Impulses100kb.png
    Impulses100kb.png
    95.4 KB · Views: 61
Last edited:
Play with the cycles, get to know/hear what it does. At 4 ms you seem to have the first reflections, probably visible in the IR too. Early reflections don't all have to be detrimental to our perception. More on that later.

Experiment with a couple of corrections based on different window lengths. That way you will learn what suits you. My personal goal has been to try and limit the window length, used for correction, as much as possible, without losing the advantages. I use DRC-FIR, which has a tad more resolution in it's frequency dependent window compared to REW, and I use different lengths for high, mid and low frequencies that fit my personal preferences (and speaker type).

Everything you can do to improve the room/speaker combination acoustically will also help improve the results. Though, you might find out the other side of that improvement. I have been on a (long) quest to lower all first reflections within the first 10-20 ms. Using absorption etc. to reach that goal. It sure made a difference, however it also uncovered the cross talk that is an intrinsic part of Stereo. A more lively room will help hide those effects, which sure isn't a bad thing.

It kind of is a balancing act to get out of it what you want. I see that as a fun way to learn, but not all may feel it like that. It might even be linked to the music you like to listen to etc. For pop music, having a reduced level of early reflections can be quite the improvement. For orchestral type of music a lot of people like the atmosphere that a more lively room creates. It is best to find out what you like, instead of me or any other person telling you what to do. I'd encourage anyone willing to play with it. For things like imaging it is important to get the first wave front that hits you about the same in balance in left and right channel. Tonal balance might be better found in longer windows to really represent what you hear. I'd still try to get the first ~6 ms as clean as possible, because anything happening within the first 6 ms will probably have quite an effect of the frequency curve.

My preference for mostly studio recorded music suits the absence of early reflections. However I did incorporate a sort of 'Haas Kicker' to not have a (too) dry presence of the room.
As you are using OB, you probably have that covered already. It can be very rewarding to work on what you've got, slowly massaging it into what you like. Play with it, don't be afraid to experiment. If anything doesn't work out as planned, don't blame the tools, but try and find the why instead. Super cool graphs don't mean anything if it doesn't sound good to you. Doing the above will make you link what you measure to what you hear. It really works!

Hope that helps you get an idea on how to move forward.

P.S. Don't take my word for it, but this is what worked for me. And it has been quite a rewarding process.
 
Last edited:
What is criteria based on what can be decided, that measurement polarity is correct?
Highest impulse peak is on positive side, or fist impulse peak? Or something else?

What can be wrong (measured or other) when after correct "filter linearization" entries in rePhase (when linearizing filter with imported measurements) phase is nearly direct line, except one 360 degree turn on frequency between filter frequencies?

Whichever peak has the greatest magnitude, positive or negative, make that peak the positive one via polarity. Whether it is the first peak or not.

Use that peak as the timing reference.


Best way to find what can be wrong that i know of, is see how well acoustic measurements conform to predicted.
 
A properly measured loudspeaker (for a given frequency range) should produce a measurement that is easy to cleanup (gating and/or smoothing, preserving what is important, with correct polarity and delay compensation), the phase of which would in turn be easy to linearize using one or two "filter linearization" entries, and maybe a tad of phase EQ...
No need to automate that: this is as simple as it gets, and you can focus on the frequency range you know that particular measurement is valid in.


..

That has become my guiding principle, and if i may paraphrase....
....if the measurement doesn't clean up easy, there is more work to be done before making any corrections.

Either through better measurement(s), or when that is failing, back to the drawing board for better speaker design prototyping.



I do not try to make room corrections via FIR. I leave room corrections to a separate process that doesn't wed the speaker to a spot in the room, or even a particular room. (and i also believe most room corrections are best made acoustically)

So it's been easier for me to get well behaved measurements, especially since I measure and correct at the driver-by-driver level.
Similarly, once that process is done, using FIR for complementary linear phase xovers eliminates most all of the need for any 'filter's linearization'. (or para phase EQ).

I realize this technique is not for everyone for a variety of reasons, but if channel counts of FIR and amplification are available, I can highly recommend it for the clarity and ease it brings to seeing what can and can't be fixed in a putting multi-way together.
 
The only suggestion I could make for rePhase, and something I am really missing, is a tool to automatically flatten the whole phase response.

This is really helpful (and basically essential) in a situation were you have multiple different active speakers you would like to combine.
For example in a PA kind of situation.
By flattening the phase response, there are less problems with interference (dips and peaks) between different speakers.

At this moment this can only being done by manually change the phase response (as far as I know).
It works, but it's just a bit tedious and finicky
But I think it wouldn't be to difficult to use some kind of reference line to automatically do this instead. Calculating the difference and correct it.

Still really enjoy using rePhase! Thanks! :)

And yes, it's never a good idea to completely flatten a frequency response.
In fact that can do A LOT more harm than good, not even acoustically speaking, but in some cases it can easily damage your speakers.
 
Last edited:
@ wesayso and @ fluid


Honestly I forgot about those other softwares and I do remember not getting matlab to work on my pc , that was years ago and I have a new pc...

I definitely need to take another stab at it....



And yeah that actually might work very good and I do know exactly what I want to change with Dirac filters , I’m in a car not a house so it’s an acoustical mess and oh quite challenging.... :). And bittersweet tedious fun as well


Rephase crossovers and Dirac is very good..... and I can’t complain with Dirac it does do a superb job for what it is.....


What I don’t like is that it simply makes the impulses match for left and right and it’s target is the Dirac impulse, and ignores some of the room related things that I feel should be changed or left alone as it changes the tonality a bit..... sure it has an amazing deep stage and very good stage location things , but in some ways I want to do things differently.... like for example... I want to make the entire left side at a constant 270deg and the entire right side at 90deg throughout the midrange and upper midbass to get good imagin both seats (of course I have minimized path length differences on drivers). Dirac says they have a automotive tool for developers and won’t let me have it.... I’m a developer just not in oem (aargh)


I’ve gotten what I’ve said with rephase fairly good, but having a tool that I can setup or program a single filter to do everything instead of a bunch of peak filters seems my next step


I think I’ll try :)
 
The only suggestion I could make for rePhase, and something I am really missing, is a tool to automatically flatten the whole phase response.

This is really helpful (and basically essential) in a situation were you have multiple different active speakers you would like to combine.
For example in a PA kind of situation.
By flattening the phase response, there are less problems with interference (dips and peaks) between different speakers.

At this moment this can only being done by manually change the phase response (as far as I know).
It works, but it's just a bit tedious and finicky
But I think it wouldn't be to difficult to use some kind of reference line to automatically do this instead. Calculating the difference and correct it.

Still really enjoy using rePhase! Thanks! :)

And yes, it's never a good idea to completely flatten a frequency response.
In fact that can do A LOT more harm than good, not even acoustically speaking, but in some cases it can easily damage your speakers.



One thing I’ve noticed with my multi-way, in a car all my drivers are mounted on different axis's and have distance between them (all under 1/4 wavelength of course). Using rephase and making a linear phase crossover for all the drivers (under 1k seems to really be the only important ones) I have zero dips and combfilters caused by drivers being on different axis’s. Just doing that seemed to solve all my alignment issues.... the rest was simply room related things....

When it comes to HF, plain old signal delay seemed to get things to line up just fine , even with iir crossovers... although I did make them linear because I can. I realized that when .10ms of delay or less becomes the difference of more then 360deg of phase then it’s a signal delay issue not a phase issue and it can be confusing when you have hundreds of wraps in the phase..... which leads to where in polarity is it actually at.... above 1k I’ll make my crossovers liner with close measurements only because I can, otherwise I wouldn’t worry too much about it, especially when you approach 2.5k it’s dam near pointless trying to measure any phase at the listening position.

I think it’s more about using REW and the tools inside it to get the Hf to rise together and have proper polarity first. From what your asking rephase already does do. I got tripped up for the longest of time fighting logarithmic vs linear scaling and finding out simply how to read in log and in lin.... then the phase stuff on rephase finally made sense... (don’t laugh it took me the better part of two years to get that one)
 
I made other test where bass and mid FIR had both 100 000 taps, mid delay is changed accordingly.
Result is same, brown line where bass FIR is inverted, mid direct; blue when mid is inverted and bass is direct.
Added also SPL line, color coding is same, green is when bass and mid both are direct and impulse in green when both are direct.

You might try inverting the polarity of the FIRs using something else than rephase, and see if the problem remains.
If it does then the problem lies in the way the FIR are applied and/or the different channels are summed.
 
rePhase 1.5.0d, development release

It has now been more than two years since the 1.4.3 version was released, and although I started implementing new features and corrected a few bugs in the meantime, I did not feel like anything was ready enough for a release. Then I had to concentrate on other things and never got around to actually finish it...

So, here is a development release. I tried to clean things up a bit and removed features that were too far off.

The only new feature remaining is a loudness compensation functionality, that could for example let you build "quiet" or "concert level" presets while preserving the same perceived tonal balance as your reference level. It is not exactly where I wanted it to be, but it is functional and probably good enough for the matter, and after 2 years without working on it I think it is better to release it as-is, at least for for now.

Other modifications are listed in the "what's new" entry in the Help menu and include adjustments and bug corrections.

Please note this is a development version. As such it has several limitations, to wit:
  • probably a few bugs :eek:
  • listening compensation parameters are not saved in settings
  • expiration in 10 days to avoid having unfinished development versions living their life in the field. The stable 1.5.0 version should have been released by then.
So please do not replace your current rephase version with this one, this is just for evaluation and bug reports, in preparation for the stable version.

With all that said, here is the link: rePhase 1.5.0 DEV

Your feedback is welcome.
 
Last edited: