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

Hello guys,


I am a german student and I am currently working on a Multiroom speaker system, which should provide a room correction function. Therefore I need to know a few things about the functionality of rePhase, so it would be great, if some of you could answer me some questions about it.

First of all, I am curious about what happens to the target response, when I increase one particular frequency in rePhase by hand, because when I do so, not just the amplification of the one particular frequency increases, but several surrounding amplifications increases as well. So, first of all i guess this is the case, because rePhase just calculates the expected target response and rePhase expect the amplification of the surrounding frequencies to increase as well. Now, I wonder why this is the case so, why do the surrounding amplifications change?
And second of all, I wonder how rePhase calculates the expected changing of the surrounding amplifications. I would it expect to be a linear interpolation, but I am not sure. Also interesting to know would be how big the area around the increased amplification is, which rePhase also changes and how rePhase determines how big this area is.

Thanks in advance.

Hello loommidom

By "surrounding amplifications change" I presume you mean that when applying an EQ point to a given frequency you see a sort of bell curve around that point, so that surrounding frequency response is also affected.

This is how PEQ work: you set a frequency, a gain, and a Q (quality) factor that will dictate how sharp the correction is (ie how surrounding frequency points will be affected).
You don't want to have discontinuities in the response (and that is impossible in practice anyway), and using this copes well with how response anomalies (that we want to correct) also manifest themselves.

As for how this shape is calculated, this is based on conventions and formulas such as constant Q EQs, proportional Q EQs, etc.
The magnitude and phase frequency response can be calculated from the their biquad implementation for example.

The time response is also worth looking at (impulse), as Q selection will have a direct impact on it.

Hope this helps :)
 
Yes, you can do FIR correction with zero delay (that is what I am currently running on my speakers).

Hello Thomas,

Can you describe that in greater detail, please? As far as I understand, we need at least N samples of the input signal to make a convolution. Where N is a number of taps of the filter. Even if the filter impulse peak is moved to the beginning of the filter file, we still need to accumulate enough input data to be able to make the first convolution.
 
Hello emailtim

Interesting use of this feature, thanks for sharing :)

As for other uses, I know some people have been using multiple banks (all of them even!) for a single correction, trying to refine the correction to the fraction of dB. I cannot say I support this kind of use as over-correction can cause more harm than good (eg correcting measurement artifacts, or position-dependent defects like comb filtering), but if done based on a reliable (set of) measurement(s) and with good analysis then it is probably a valid strategy if one has the time and patience to do so :)

I tend to only use a limited number of EQ points, but spread them across banks depending on the target of the correction (anechoic response, room adaptation, loudness compensation, driver to driver variation correction, etc.).

One thing that could help in your case (and mine as well) would be to be able to give a different title to each bank, to explicitly explain what it's intend is.
Right now the only way of documenting the use of each bank would be in the global "note" entry in the general tab.

I have also used the extra banks to try a second or third pass of correction. I tend to use "cuts-only" corrections and 17 PEQs doesn't appear to catch all peaks on the first pass.

I first tried to AutoEQ below and above Schroeder separately to allocate up to 17 PEQs for each AutoEQ (34/pass) but this method had the problem of not properly correcting across Schroeder. The AutoEQ appears to need an "anchor point" on the other side of Schroeder. That is when I decided to try the duplicate file with deletion method which has the "anchor point" on both sides of Schroeder. I can still do a second pass if desired.

My even/odd bank number scheme is my form of organization or documentation to keep track of what each bank is for.
 
Last edited:
Hello loommidom

By "surrounding amplifications change" I presume you mean that when applying an EQ point to a given frequency you see a sort of bell curve around that point, so that surrounding frequency response is also affected.

This is how PEQ work: you set a frequency, a gain, and a Q (quality) factor that will dictate how sharp the correction is (ie how surrounding frequency points will be affected).
You don't want to have discontinuities in the response (and that is impossible in practice anyway), and using this copes well with how response anomalies (that we want to correct) also manifest themselves.

As for how this shape is calculated, this is based on conventions and formulas such as constant Q EQs, proportional Q EQs, etc.
The magnitude and phase frequency response can be calculated from the their biquad implementation for example.

The time response is also worth looking at (impulse), as Q selection will have a direct impact on it.

Hope this helps :)


Yeah, this helps a lot and i guess all my questions are answered. thank you very much pos!
 
As far as I understand, we need at least N samples of the input signal to make a convolution. Where N is a number of taps of the filter. Even if the filter impulse peak is moved to the beginning of the filter file, we still need to accumulate enough input data to be able to make the first convolution.
For a real-time direct convolution you simply need to calculate the next sample, and the accumulation effect on the N coming ones that you will later be using. The convolution process itself does not imply any delay.
 
I don't know if there are any E-mu SP1200 aficionados around here, but I have been playing with the javascript webaudio API lately, trying to emulate its sound:

SP12k - SAMPLING PERCUSSION

It is a web application, running in chrome desktop, firefox desktop, and android devices (although latency might be quite high there depending on the device and android version).
ios and safari are not supported for now, but it works with chrome on macos.

I am pretty satisfied as far as sound is concerned (close to indistinguishable from the original on the sound comparisons I have tried), but I still have a lot of work ahead of me with functionalities (sequencer, sample editor, mixer, ... filters, etc.).

attachment.php
 

Attachments

  • sp12k 0.1.3.jpg
    sp12k 0.1.3.jpg
    431.5 KB · Views: 690
Last edited:
If one models the phase response of an "ideal" speaker, it is similar to the blue curve in the chart below. Of course, it depends on the low frequency cutoff and roll off slope for any particular speaker system, but if you play with different low frequency box alignments, the phase shape is more or less the same.


634680d1505064992-rephase-loudspeaker-phase-linearization-eq-fir-filtering-tool-rew-lr-speakers-phase-listening-position-jpg


The red and green traces are my speakers measured at the listening position some 9 to 11 feet away. I used FDW and psychoacoustic smoothing in REW as it closely matches the correction settings used for the DSP FIR filtering.

I have experimented with just linearizing the phase in a 3 way system with a passive XO and must say I did not notice a huge improvement when I switched the filter in and out while listening to music in real time. However, when I time aligned the drivers using linear phase digital XO and then corrected the excess phase, I noticed a considerable improvement in the "depth of field" in listening. Almost like the sound went from 2D to 3D.

I am wondering if this is the same sense that wesayso and others with line arrays are hearing as these types of speakers are inherently time aligned and have no XO to mess with different time arrivals and phase...

Thoughts?

Hi Mitch,

this is probably not the measurement of the last version of your filters but I choose to comment anyway just to draw attention to one common problem that is easilly overlooked.

Your phase response look very neat, except for the 40-80Hz region in which there is more than 100 deg of difference between phase of left and right speaker which will cause a cancellation of response in that frequency region. That cancellation won't of course be visible in each speaker response but is easilly visible if you measure response of both speakers. But as I said, I'm pretty sure that in the meantime you polished phase response of your speakers.

I had the same issue in the same region and was able to correct it via phase EQ with rePhase. Here it is how my graphs are looking. measured from LP (4m from the speakers, FDW of 12 cycles and psychoacoustic smoothing):





 
I wonder which is more "correct" then :)

Both are "correct". :) Applying FDW is essential with phase correction to filter the refletions. Although the graph will be a little "choppy" for the phase itself you can go solely with it. But if you try to display GD based on that "choppy" phase graph you would see that using some smoothing (like psychoacoustic or 1/6 octave) together with FDW is also beneficial.

In my system I have found that using a spatially averaged measurement across my couch in a similar way that SwissBear has written about here before is very useful to base a correction on.

Can you please post a link to his post where he described it?
 
Wesayso's approach to phase manipulation/correction is quite different in some ways to linearizing the phase turn from a crossover filter. And that difference is important when discussing the conclusion or if the evaluation method is valid.

I have built a speaker similar to his and used a correction filter based very heavily on his where there is Excess phase correction up to 1K. The correction aims to follow the generated minimum phase of the frequency response at the listening position. There is a very audible change in the sound of the bass when changes are made to the amount of phase correction or if it is removed completely. This is more room correction (or room speaker interaction) than pure speaker correction. I have never tested the same sort of correction on any other speaker to know if the result is the same but on my line array the difference is clearly audible.

This is the change in phase when viewed through a 6 cycle FDW. There are always arguments as to whether this is the "right" way to go but I find it hard to believe that other's could not hear what I am hearing in the same situation.

634458d1504929810-rephase-loudspeaker-phase-linearization-eq-fir-filtering-tool-vs-phase-jpg


Jim what does the phase of your speaker look like at your listening position with and without the correction? Testing at 1m metre might not help you because the room will mess up the phase and then it becomes hard to hear the difference between two different messes :)

I believe you did the right way. In fact, your post couls have saved me quite some time if I have read it 6 months ago when I started to search the way to do this.

This is how my phase response looked when measured at LP (FDW of 6 cycles, 1/6 smoothing) with phase correction applied only to my room EQ filters and passive XO:
Here you can also see the phase mismatch around 80 and 220Hz whithc cause cancellation in FR response when measuring both speakers playing. Btw, IMHO measuring both speakers is the right way to check your LF response as only after 100Hz or so they are playing for themselves, but in the range lower than 100Hz it is the sum what we hear.



And this is how it looks now when I corrected it:

 
Last edited:
I want to add one more thing, which may sound as heresy to many as SwissBear tutorial is quite popular:

I didn't use Vector average to EQ frequency response with rePhase. As per Thomas (aka POS) advice I used MMM averaged RTA measurement with pink noise with 1/6 smoothing and that worked really well.

If you make 8 sweeps over the edges of 1m2 area at your LP and one additional at the center and make standard average of those sweeps you will see that it correlates really well with MMM done over the same area. I tend to trust MMM more for the simple reason that it has much more samples than 9. But if you compare those 2 averages with Vector average of those same 9 sweeps you will see that it differs, at some frequencies quite a lot.

IMHO vector average was introduced in REW to average time responses and that is how I used it. This post from John Mulcahy seems to confirm it
( Spacial Average Measurements | AV NIRVANA )

"It (Vector average) was added at the request of users who wanted a vector average to allow phase correction to be applied to the result."

I applied FDW of 1/6 cycles and 1/6 smoothing to vector averaged phase response which I then corrected with rePhase.
 
Last edited:
Questions about measurements and correction sample rates.

Some software requires the input measurements and output sample rates to match. Does RePhase have such limitations ?

If not, what are the optimal measurement and correction sample rate relationships ?

Is it better to measure at a higher sample rate and then convert to the same sample rate or down convert ?

Are their any limitations or drawbacks to be aware of ?

TIA
 
I want to add one more thing, which may sound as heresy to many as SwissBear tutorial is quite popular:

I didn't use Vector average to EQ frequency response with rePhase. As per Thomas (aka POS) advice I used MMM averaged RTA measurement with pink noise with 1/6 smoothing and that worked really well.

If you make 8 sweeps over the edges of 1m2 area at your LP and one additional at the center and make standard average of those sweeps you will see that it correlates really well with MMM done over the same area. I tend to trust MMM more for the simple reason that it has much more samples than 9. But if you compare those 2 averages with Vector average of those same 9 sweeps you will see that it differs, at some frequencies quite a lot.

IMHO vector average was introduced in REW to average time responses and that is how I used it. This post from John Mulcahy seems to confirm it
( Spacial Average Measurements | AV NIRVANA )

"It (Vector average) was added at the request of users who wanted a vector average to allow phase correction to be applied to the result."

I applied FDW of 1/6 cycles and 1/6 smoothing to vector averaged phase response which I then corrected with rePhase.
There are many ways to get to the same result :)

MMM is frequency averaging, you can get a very similar result in REW on multiple measurement points by using the "average the responses" button on the bottom left of the All SPL screen.

Vector averaging / spatial averaging weights the dips more heavily and can generate bigger dips in the averaged response particularly when there are reflections in the measurement.

Bob McCarthy has a good page in his Sound System Optimization book where he compares different averaging schemes, I think the page might be visible in the Google preview if you don't have a copy of the book.

As you said a combination of the two can be useful for different things.
 
There are many ways to get to the same result :)

MMM is frequency averaging, you can get a very similar result in REW on multiple measurement points by using the "average the responses" button on the bottom left of the All SPL screen.

Vector averaging / spatial averaging weights the dips more heavily and can generate bigger dips in the averaged response particularly when there are reflections in the measurement.

Bob McCarthy has a good page in his Sound System Optimization book where he compares different averaging schemes, I think the page might be visible in the Google preview if you don't have a copy of the book.

As you said a combination of the two can be useful for different things.

In my experience, when speaking about frequency response, MMM and simple average (what you get when you press "Average the response" button on All SPL screen) of sufficient number of sweeps made over the same area you performred MMM will get you pretty much the same result, athough I trust MMM to be more precise as it usually has 60-70 samples and you certainly won't make and average that many sweeps.

Vector average , on the other hand, will NOT give similar result for frequency response, and it really shouldn't be used for that purpose as it was designed to be used for PHASE averaging, as stated by John Mulcahy in the quote I posted.

P.S. thank you for the book reference. :)
 
As my way of phase EQ was mentioned here, let me add a couple of things I do find important. Try and solve as many phase wiggles with old fashioned means, meaning treatment of first reflection points. Next, look at the listening area of interest and find what the phase traces have in common along that area. That's where I base my correction on, not always trying to straighten every wiggle completely, sometimes even removing some extra energy at a dip (works well only below say 80 Hz) and compensating for that in the other channel (or another driver like a helper subwoofer) to get a better, more consistent behaviour over a wide listening area.
Phase manipulation at higher frequencies is not something I would recommend. The wavelengths simply are too short to be valid over a wide(r) area.
Luckily these anomalies often are easier to fix with the treatment methods I mentioned before. For instance an absorbing panel on side walls etc.
Getting a good clean IR result at the listening spot with first reflections sufficiently reduced is more than half of the job to get these tweaks being valid over a wide listening area.
 
Last edited:
As my way of phase EQ was mentioned here, let me add a couple of things I do find important. Try and solve as many phase wiggles with old fashioned means, meaning treatment of first reflection points. Next, look at the listening area of interest and find what the phase traces have in common along that area. That's where I base my correction on, not always trying to straighten every wiggle completely, sometimes even removing some extra energy at a dip (works well only below say 80 Hz) and compensating for that in the other channel (or another driver like a helper subwoofer) to get a better, more consistent behaviour over a wide listening area.
Phase manipulation at higher frequencies is not something I would recommend. The wavelengths simply are too short to be valid over a wide(r) area.
Luckily these anomalies often are easier to fix with the treatment methods I mentioned before. For instance an absorbing panel on side walls etc.
Getting a good clean IR result at the listening spot with first reflections sufficiently reduced is more than half of the job to get these tweaks being valid over a wide listening area.

To be honest I don't remember ever seeing any scientific paper that covers room treatment influence on phase response measured at LP.

I also don't remember seeing measurements of a reasonable quality done by enthusiasts covering the topic of phase EQ with room treatment.

Sure, room modes. SBIR effects, wall reflections etc would affect phase at LP in a similar manner they affect magnitude response, but IMO room EQ should be first weapon of choice for fighting those things. Not only because it does the job better than room treatment but also because most of us listen our music in the rooms where we live and not in dedicated studio rooms so room treatment is not really a viable option.
 
Even when looking at 6 cycle FDW's those treatments (or the benefits they bring) are easy to spot in measurements.
How much treatment is needed to get good results will also depend on speaker topology.
I don't like side wall reflections, as it messes with imaging too much for my taste. Making every song image wider than it should and not really vary all that much with each song played (as it should i.m.h.o.).
I don't expect others to share my preferences though, it was part of the journey I wanted to take/try. All in all that's why I made the choices like I did, floor to ceiling speakers, no crossovers (well, I do have some now, after adding subwoofers) and absorbing all early reflections while bringing in virtually created new ones that mimic a more ideal space than what I have. Long long story, all documented here. (not kidding about the "long" part :))
 
Even when looking at 6 cycle FDW's those treatments (or the benefits they bring) are easy to spot in measurements.
How much treatment is needed to get good results will also depend on speaker topology.
I don't like side wall reflections, as it messes with imaging too much for my taste. Making every song image wider than it should and not really vary all that much with each song played (as it should i.m.h.o.).
I don't expect others to share my preferences though, it was part of the journey I wanted to take/try. All in all that's why I made the choices like I did, floor to ceiling speakers, no crossovers (well, I do have some now, after adding subwoofers) and absorbing all early reflections while bringing in virtually created new ones that mimic a more ideal space than what I have. Long long story, all documented here. (not kidding about the "long" part :))

Well, your preferences are certainly not typical but I'm glad you found a way to get the sound you like - enjoy your music! :)
 
Some software requires the input measurements and output sample rates to match. Does RePhase have such limitations ?

If not, what are the optimal measurement and correction sample rate relationships ?

Is it better to measure at a higher sample rate and then convert to the same sample rate or down convert ?

Are their any limitations or drawbacks to be aware of ?

TIA
Hello emailtim

rePhase is agnostic to the measurement process itself, so any specific rule regarding measurement will have to do with the measurement software itself (things like sampling rate, calibration, gating, etc.).

The higher the measurement sampling rate the larger the bandwidth on which you will be able to see the result of your correction, but 48kHz is enough for any practical purpose here. This is only a visual clue.

In any case the measurement sampling rate (and other parameters) has no relation with the FIR sampling rate. You can even build your FIR without relying on any measurement.