Two issues about IR wav export : modified gain and phase

Erdman

Registered
Thread Starter
Joined
May 29, 2022
Messages
11
More  
Main Amp
Allo Volt+D
DAC
SMSL Sanskrit
Front Speakers
Davis Acoustics Olympia One Master
Subwoofers
B&W ASW608
Streaming Equipment
Raspi + Moode
Hello avnirvana community, and thanks for sharing about REW !


I've got a few questions about REW and IR export as wav file. Actually, I took some measurements for left and right speakers and set up IR for correction :
1- one IR for gain correction, from a RMS average of my measurements and then EQ filters calculation, thanks to REW built-in tool.
2- one IR for phase correction, from a vector average of my measurements, then excess phase version and finally 1/A function.

When REW calculates "vector average of the measurements" * "1" * "2", it produces a corrected measurements, with gain corrected as well as phase corrected. Which is great !

However, I've got two issues when trying to export the correcting IR ( "1" * "2" ) as a wav file, and then importing the wav file in REW back again :
- the frequency response is modified : it's about 100 SPL high - instead of being around 0 SPL
- above all : the impulse response is shifted along time axis. It seems that REW tries to find the higher peak and set t=0 on that peak when exporting IR as a wav file.

I have two pictures about my last point, but as a new member I am not allowed to post URL. You could see on the first picture that t=0 is not on the main peak. This measurement was calculated in REW, and it does correct the initial measurement as expected.
The second one is the same measurement exported as a wav file and imported back in REW. t=0 is now set on the main peak.

Is there a way not to change gain and, above all, time adjustement when trying to get an IR in wav format for convolution operation in playback system ? or a way to correct the produced IR ?


Thanks for your help,

E
 

Attachments

  • impulsion exportée.jpg
    impulsion exportée.jpg
    70.3 KB · Views: 7
  • impulsion calculée.jpg
    impulsion calculée.jpg
    69.8 KB · Views: 9

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,296
WAV files have no concept of absolute time or of SPL levels. You can use the SPL & Phase graph controls to apply any desired SPL offset to the response or to set the peak of the response to some specific SPL. When a WAV file is imported t=0 can be placed at the start of the file or at the peak, but you can use the Impulse graph controls to set the t=0 reference wherever you need. Neither the SPL nor t=0 adjustments make any difference to what a convolution engine will do with the file, they are just conveniences for your visualisation of the corresponding magnitude and phase responses.
 

Erdman

Registered
Thread Starter
Joined
May 29, 2022
Messages
11
More  
Main Amp
Allo Volt+D
DAC
SMSL Sanskrit
Front Speakers
Davis Acoustics Olympia One Master
Subwoofers
B&W ASW608
Streaming Equipment
Raspi + Moode
Hello John,

Thank for your quick reply and explanations, that's nice.

OK for that : "Neither the SPL nor t=0 adjustments make any difference to what a convolution engine will do with the file, they are just conveniences for your visualisation of the corresponding magnitude and phase responses."

However I still wonder why REW does not produce the same result when doing A*B, with A=measurements vector average and B=correction impulsion, when B is from internal calcuations (excess phase version, then 1/A) or after exporting this IR as a wav file and then importing back. Here are attached the pictures of the two different results : the phase does not look the same at all. Is this A*B calculation not exactly what the convolution engine will do ?

The first picture is with the calculated IR.

The second picture is with the same IR exported as wav file, and imported back (and shifted t=0 as I shared in previous post pictures)
 

Attachments

  • impulsion calculée_résultat.jpg
    impulsion calculée_résultat.jpg
    65.8 KB · Views: 6
  • impulsion exportée_résultat.jpg
    impulsion exportée_résultat.jpg
    81.7 KB · Views: 6

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,296
The display of phase depends on where t=0 is placed, time delays (moving where t=0 is placed in the IR) correspond to a phase shift that increases or decreases linearly with frequency depending on whether t=0 is placed earlier or later. If you ask REW to estimate and remove the IR delay on that corrected response you will probably get the phase view you expect when REW shifts where t=0 is placed. It makes no difference to what you would hear from the convolution engine output, you hear sound when it arrives at your ears and how long it takes to get there doesn't matter.
 

Erdman

Registered
Thread Starter
Joined
May 29, 2022
Messages
11
More  
Main Amp
Allo Volt+D
DAC
SMSL Sanskrit
Front Speakers
Davis Acoustics Olympia One Master
Subwoofers
B&W ASW608
Streaming Equipment
Raspi + Moode
Hello John,

Thank you very much for the added explanations. I've just tried what you suggested : on the corrected response I remove IR delay, and the phase was quite perfectly the same as expected.

Now I have a better understanding of what is an "impulse" and what's the effect of convolution. (or at least I have fewer misconceptions about it...).

Thank you again for REW, and for the time you give to share your knowledge !

E
 

Erdman

Registered
Thread Starter
Joined
May 29, 2022
Messages
11
More  
Main Amp
Allo Volt+D
DAC
SMSL Sanskrit
Front Speakers
Davis Acoustics Olympia One Master
Subwoofers
B&W ASW608
Streaming Equipment
Raspi + Moode
John,

While I got a little of your attention, may I ask for options which are to be used when exporting an IR as a wav file, to use in a convolution engine ?
- I was advised to use "symetrical window", for example 500 ms left and 500 ms right
- "Normaiise samples to peak value" : to be checked or not ?
- "Apply IR Window before export" : to be checked or not ?

E
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,296
If you want the non-zero part of the exported IR to span a particular time and the IR peak (or reference time, if not at the peak) to appear at a specific time into the response then yes, apply the windows before export. Probably best for most convolution engines. Normalise to peak gives the best dynamic range for integer export formats, it might cause an overall gain change depending on the response and how the convolution engine deals with the IRs it imports.
 

Erdman

Registered
Thread Starter
Joined
May 29, 2022
Messages
11
More  
Main Amp
Allo Volt+D
DAC
SMSL Sanskrit
Front Speakers
Davis Acoustics Olympia One Master
Subwoofers
B&W ASW608
Streaming Equipment
Raspi + Moode
Thank you very much for your help, John.
 
Top Bottom