Jump to content
IGNORED

Using REW and rephase to generate amplitude and time domain corrections


Recommended Posts

On 6/25/2017 at 6:55 AM, SwissBear said:
Last year, Pos the author of rePhase and JohnMP the author of REW, have implemented an interface in order to allow usage of amplitude correction filters generated inside REW in rePhase, and improve the possibilities to use rePhase as a tool to generate room corrections.

Since the 5.18 beta version of REW, JohnMP has implemented some new features which allow:
  • to simplify the averaging of measurements (time alignment and vector averaging)
  • to generate a minimum phase and an excess phase versions of any measurement, which allow to greatly simplify the possibility to use rePhase in order to generate a minimum phase correction of any system.
I have updated a short 'How To' guide in order to illustrate these features.
This manual is available here: https://www.dropbox.com/s/10xdhh83jokzbxv/REW_rePhase_tuto.pdf?dl=0

Thanks again to JohnMP and to Pos for making this interface so easy to use
  Edit/Delete Message

 

Hi @SwissBear,

 

Thanks a lot for your tutorial! I've been using REW for building filters for FR correction and minor room corrections for a while, but have not worked with rePhase until recently.

 

One question I have is in the phase adjustment step, you suggest generating 'Excess Phase' plot and to import it into rePhase for adjusting.

 

When I do this step, the phase plot has large swings and jumps, and while I can force it closer to zero by applying lots and lots of large filters, it seems like that's not the right thing to do. Maybe my phase measurements are off, or the room needs a lot of treatment? 

 

Should I make the phase adjustment on the impulse-response (amplitude-only filters) instead? That seems to have a much more well-behaved phase plot and is much easier to adjust with rePhase. But is that the right place to generate phase filters?

 

 

 

Link to comment
2 hours ago, pkane2001 said:

 

Hi @SwissBear,

 

Thanks a lot for your tutorial! I've been using REW for building filters for FR correction and minor room corrections for a while, but have not worked with rePhase until recently.

 

One question I have is in the phase adjustment step, you suggest generating 'Excess Phase' plot and to import it into rePhase for adjusting.

 

When I do this step, the phase plot has large swings and jumps, and while I can force it closer to zero by applying lots and lots of large filters, it seems like that's not the right thing to do. Maybe my phase measurements are off, or the room needs a lot of treatment? 

 

Should I make the phase adjustment on the impulse-response (amplitude-only filters) instead? That seems to have a much more well-behaved phase plot and is much easier to adjust with rePhase. But is that the right place to generate phase filters?

 

 

 

 

I think I can answer my own question :)

 

The Excess phase is the difference between minimum phase and the phase error of the measurement. That's what I need to adjust to zero, so that the result is minimum phase.  I'll have to see if I can get another set of measurements that make more sense and are easier to adjust...

Link to comment
3 hours ago, SwissBear said:

Hi @pkane2001,

Thanks for your interest in REW/rePhase.

The excess phase is the difference between the minimum phase and the phase actually produced by your system. This difference should effectively be brought back to close to zero in order for your system to behave as a minimum phase system.

As a general rule, you should mainly use the Filters Linearization tag, select the frequencies of your LS crossovers and adjust the slope for each of them. After this step, there should only be some light adjustments to make in the Paragraphic Phase EQ, mainly gentle adjustments in the area of the cross-overs.

If you need help on this, I invite you to join the very friendly and dedicated community which is supporting rePhase here: http://www.diyaudio.com/forums/multi-way/221434-rephase-loudspeaker-phase-linearization-eq-fir-filtering-tool-217.html

 

Thank you! I did think that the Filter Linearization was needed, but couldn't figure out how to make that work. I've also looked at the DYI thread before, but was intimidated by the number of posts there :) I'll dive into it for more details, now.

 

Thanks again.

 

Link to comment
  • 2 weeks later...
On 9/7/2017 at 4:01 AM, SwissBear said:

Hi @pkane2001,

Thanks for your interest in REW/rePhase.

The excess phase is the difference between the minimum phase and the phase actually produced by your system. This difference should effectively be brought back to close to zero in order for your system to behave as a minimum phase system.

As a general rule, you should mainly use the Filters Linearization tag, select the frequencies of your LS crossovers and adjust the slope for each of them. After this step, there should only be some light adjustments to make in the Paragraphic Phase EQ, mainly gentle adjustments in the area of the cross-overs.

If you need help on this, I invite you to join the very friendly and dedicated community which is supporting rePhase here: http://www.diyaudio.com/forums/multi-way/221434-rephase-loudspeaker-phase-linearization-eq-fir-filtering-tool-217.html

 

Just as a follow up, here's the corrected speaker output with phase closely matching minimum phase response. I also corrected my HD650 headphone output. Sounds great!

 

phase.thumb.png.81e106bad21489c29a43f12e785a067b.png

 

Link to comment
  • 2 months later...
On 11/18/2017 at 5:38 PM, lasker98 said:

I'm having a problem following along with SwissBear's guide. I think I've done the first 3 steps ok, but I'm lost on step 4. which reads as follows:

 

"4. Correction finalization
Once you have finalized the phase correction, you can import the initial averaged
measurement in rePhase and apply the REW filters. The result could look like this:"

 

I'm reading "Once you have finalized the phase correction" to mean once I have finished the phase correction in rePhase on the convolved (A*B) extended phase created in step 3. 

 

This part "you can import the initial averaged measurement in rePhase and apply the REW filters" has me lost. What do I do with the phase correction I just completed on the extended phase (shown in screenshot below)? Am I supposed to leave that as is in rePhase and now import my measurement that I eq'd in REW into the open window in rePhase that currently has the corrected excess phase with all settings from that phase correction? I'm sorry for the dumb questions but I'm pretty much lost at this point. I read the full 237 pages from the DIY thread but most of it seemed to be more focused on working with individual crossovers and I wasn't able to find an answer.

 

I've also included my original measurement files for left and right speakers in case they're of any use:

 

LR_Original.mdat.

 

These were initially done in Audiolense and imported into REW.

 

Thanks,

 

Bill 

 

 

R_EP_correction.jpg

 

You can just apply the PEQ corrections to the same curve where you've corrected for minimum phase in Rephase. Switch to Paragraphic EQ tab, then load the same settings you used (and saved) for amplitude adjustments, then generate. The resulting curve will include both, phase and amplitude corrections.

 

 

Link to comment
48 minutes ago, lasker98 said:

1) I'm wondering what the reason is for using a flat target in REW for the EQ (Speaker Type = None, instead of Full Range)

 

You can use whatever target (aka house curve) you like. Flat is the expected curve for a completely neutral/transparent system. Some folks, including me, find a little boost in the bass region and a gentle roll-off in the higher frequencies helps. 

 

48 minutes ago, lasker98 said:

2) my excess phase generated from convolving A*B is a flat horizontal line from low to upper hf limit where it falls off at 90 degrees. It would seem there should be some kind of deviation from flat otherwise there is no excess phase to correct? Does mine sound correct?

 

That doesn't sound right. I found that there's very little phase to correct with my headphones, but with my speaker system there were very large deviations. I suspect that you need to use REW to measure. Don't know much about Audiolense, but it looks like phase is either not being recorded or is not being imported correctly in REW.

 

48 minutes ago, lasker98 said:

3) once I have the excess phase corrected for phase in rePhase, I then load in my original measurement to apply the saved eq amplitude filter. As soon as I load the measurement, before applying the REW filters, the corrected phase in rePhase shifts up, maybe 90 to 180 degrees. Does that sound normal? Should I be readjusting the phase to correct for that shift before generating the final impulse?

 

Wait.. I apply the PEQ filters only (not measurement) to the phase-corrected curve. I don't reload the amplitude corrected curve at that step.

48 minutes ago, lasker98 said:

4) My original measurement is 48k. I'm using jriver for convolution. Can I just change the rate in rePhase Impulse Settings to 44.1, 88.2 and 96 to create impulses for each sample rate I want to use in jriver, using the same 48k measurement and corrections? (My dac only goes up to 96k). That means I'd have to generate 8 impulses to make my 4 .cfg files for jriver convolver.

 

Don't know if JRiver convolver has this option, but HQPlayer has a setting to extend the impulse response to the desired frequency. With HQP, I can also use the highest rate impulse with lower frequency playback, so I generate one file at 384Khz/floating point and use that with all of my content.

 

48 minutes ago, lasker98 said:

5) For my first attempt I did separate left and right channel mono corrections for phase (not using same correction for both channels). I read some discussion on using same phase correction for both channels. I'm wondering if there's a real preference on mono for each channel or same correction for both.

 

I generated separate files for each channel, as there's some asymmetry in my speaker system. With headphones, I found that the left and right channel are nearly identical from amplitude and phase perspective, so I used a single impulse file for both.

 

Link to comment
16 minutes ago, lasker98 said:

It seems like I'm still not clear on this step then. It sounds like you're saying you apply the PEQ filters to the same measurement (excess phase of A*B) that you did the phase adjustment on in rePhase.  Here's the description from the guide step 4 (bold added by me):

 

"4. Correction finalization
Once you have finalized the phase correction, you can import the initial averaged
measurement in rePhase and apply the REW filters.
"

 

I see what you're doing, and that should work just as well as what I suggested. As long as you have the phase and amplitude corrections loaded into the same session, the generated impulse response will have both.

 

Link to comment
30 minutes ago, lasker98 said:

I'm definitely getting phase information in my measurement so I'm pretty sure it's not an issue with the measurement. Just to clarify, I'm generating the excess phase directly from the convolved A*B measurement from Step 3 in SwissBear's guide. Is that the correct procedure? No need to generarte a minimum phase first? I'll redo to double check the steps I followed.

 

 

That's correct: you compute the excess phase from the A*B measurement (amplitude corrected measurement). Excess phase is the difference between minimum phase and the phase of your amplitude corrected curve, so no need to compute minimum phase first.

Link to comment
37 minutes ago, lasker98 said:

Thanks. I'll go through everything again and see if I can figure out what's going on with the flat excess phase measurement. Even with the correction as I did it, compared to the frequency only corrections I did in REW, the improvement with the added phase correction is definitely noticeable. Well worth the time invested.

 

I just looked at your measurements file. It appears that you've imported the data as an impulse response into REW? Can you try importing as a frequency response? Not sure that'll make a difference...

 

EDIT: probably not going to make a difference.

Link to comment
5 hours ago, lasker98 said:

I tried a couple more run throughs with SwissBear's procedure and I always get the flat excess phase. After thinking about it more, I believe the flat excess phase is ok. The flat line is showing the amplitude of the excess phase, not the phase. I believe there shouldn't be any difference in amplitude between the excess phase and my amplitude corrected measurement, thus the flat line I'm seeing. The difference between the two is phase, which is what I'm trying to adjust for in rePhase.

 

 

Excess phase is the difference between phase of the amplitude corrected curve and minimum phase, in degrees. If excess phase appears as a flat line at zero, that means your amplitude corrections already produced a minimum phase response and no more adjustment is necessary. I'll try to go through the steps with your data to see if I get the same flat line as you.

 

 

 

Link to comment
21 minutes ago, lasker98 said:

That would be great. Thank you.

 

I'm seeing non-zero phase, and it's definitely not flat. How are you generating your PEQ filters? Are you doing this in REW?

 

Here's what excess phase looks like, when I generate it from your data,  loaded in rePhase. I let REW pick the PEQ filters automatically. You can see that it's not at all flat:

 

phase.thumb.JPG.5e3ee67ed61476553f941f16b9fe5dd8.JPG

 

Link to comment
4 minutes ago, lasker98 said:

Very odd. That looks more like eq'd measurement before anything in rePhase. Here's screenshots of my full REW graphs window. You can kind of see the shapes in the thumbnails in the left sidebar. I've also included the excess phase as imported into rePhase prior to any corrections being applied (phase or frequency). I'm using 6 cycles FDW and psychoacoustic smoothing for the REW EQ.

 

5a15f05f8e4d0__09measurements.thumb.jpg.ad02e2aedf186bd4630af5b5e3a6c8e6.jpg 

 

5a15f06fb7db0__09EP_rePhase.thumb.jpg.28d91eb6137eb317da186cd275e3e46b.jpg

Can you upload the above measurements file including excess phase ?

Link to comment
1 hour ago, lasker98 said:

Just a note for clarification on those measurements. The Left_original and Right_original are the imported measurements from Audiolense that were in the previously posted .mdat measurement file. They have no windowing or smoothing when imported, that's applied after importing into REW. 

 

In the .mdat file I just uploaded, those have the 6 cycles FDW and Psychoacoustic smoothing applied, as they were used in auto generating the REW EQ filters.

 

OK, now I'm getting a result much closer to the one you posted. Although it's not perfectly flat, it's close. I think that's OK. After all, you are correcting phase and not amplitude in rePhase (I think that's what you said earlier :))

 

phase_r.thumb.JPG.4f3dcca8f7060e86f09c5e646d0238c6.JPG

 

Link to comment
6 hours ago, lasker98 said:

That's much closer for sure. I appreciate you taking the time to look at my measurements. Would you mind posting the measurements you did to end up with the excess phase you posted? I'm very curious about what you did to get the one dip around 270 Hz.

Thanks.

 

That dip surprised me, but it was there no matter what I tried. I'll have to reproduce the measurements, as I don't think I saved them. I'll post them as soon as I get a chance (and recover from food coma).

 

Link to comment
13 hours ago, lasker98 said:

That's much closer for sure. I appreciate you taking the time to look at my measurements. Would you mind posting the measurements you did to end up with the excess phase you posted? I'm very curious about what you did to get the one dip around 270 Hz.

Thanks.

 

You know, I think there might be a bug in REW. Just one time I opened your measurements file and was able to generate a completely flat excess phase amplitude plot, just like the one you posted. But never again.

 

I wanted to repeat the steps to make sure I did everything right, and every single time after this, I got the same dip that I saw before. I could swear that I repeated all the same steps, used only your measurements data, and yet, I couldn't reproduce the completely flat line again. Here's the measurements file with the dip:

 

dip.mdat.zip

 

Link to comment
  • 5 months later...
On 5/2/2018 at 3:50 PM, RAzZin said:

Guys, could you please explain what to do starting from the end of p. 3 of the guide:

 

"The excess phase, which has been generated, can now be exported as .txt to rePhase,
where it will serve to make the time domain correction."

 

I load the excess phase (I received it as an almost flat line with a small dip on 200hz) to rePhase.. then what? What do I have to do in p.4? I'm completely lost there, could you please tell me next steps, in what buttons to press manner?

 

If your excess phase is at zero degrees and flat, there's no real correction needed. If excess phase deviates from flat, you'll then need to use Rephase filter banks to adjust it so that it's nearly flat and near zero, load your frequency EQ filters into the same session and then generate an impulse response file from Rephase that has both, frequency and phase corrections.

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...