Delay in Impulse response WAVs when using Time Ref

Finnmaker

Registered
Thread Starter
Joined
Sep 20, 2022
Messages
5
Ok, so I've been using REW to create IRs for guitar cab emulation for a few years now. Recently I decided to try and update to 5.20.9 to add the option of timing reference to make blending microphones correspond more to the real world so that I can creatively phase cancel some frequencies by using the actual mic positions when summing two IRs.

I'm doing these in quite large bunches, so the added benefit of Export all IRs as WAV has been an exciting one as well.

The issue I'm running to is that I'm getting a constant , roughly 4080 (at 48kHz) sample delay in all of my IR WAV exports regardless of the time and IR window parameters I set in REW. Or in other words, the exported IR WAV file has an empty space of roughly 4080 samples, before the peak. This of course creates an unwanted pre-delay that in a playing context is impossible to use. And I'd have to manually shorten the start time, which is far more of an incovenience than the added benefit of time reference.

I'm by no means a pro at REW, but this issue only came after the update. And I've no such issue with previous versions.

I would love to know if I'm doing something wrong, or if this could be a bug or a feature.


Thanks!
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
You should be able to get what you need by exporting windowed impulse responses, provided all have the same window widths and window reference time (you can use Apply windows to all in the IR windows dialog to ensure that).

Export all impulse responses as WAV

Export the impulse responses for all current measurements in WAV format. The exported file will have a minimum duration of 1 second. The dialog provides options to choose whether to export the measured IR, the IR after any EQ filters have been applied to it or a minimum phase version of the IR. The response can optionally be normalised so that the peak value is unity (0 dBFS). There is also an option to apply the current impulse response window settings to the response before exporting it. The sample format can be chosen as 16, 24 or 32-bit signed PCM or 32-bit Float. Float is recommended if the application using the data can accept this, particularly if the response is not normalised. Exports use the sample rate of each measurement. The peak of the exported response occurs 1 second after the start unless the IR window has been applied, in which case the export starts at the first windowed sample and the peak location depends on the IR window settings. That can be used to preserve relative timing for exported impulse responses that have been captured with a timing reference: define IR windows for the responses that have the same window ref time and the same left window width - use rectangular windows if the data should not be altered by the window. The exported IR for each impulse will then start at the start of the left window, which will be at the same absolute time for each, so their relative timing will be preserved.
 

Finnmaker

Registered
Thread Starter
Joined
Sep 20, 2022
Messages
5
Thanks for the response. The problem is that I've been doing exactly that. If you read my post, it says that regardless of the setting in the left IR window (I've come to use 0,3ms with success on the previous version). There is that extra silence in front of the impulse.

I've been succesfully doing this for over a year with previous versions The issue is only in 5.20 now with the time ref sweep. (I haven't had time to test the sweep without Time Ref)

How I create the wavs:

import all impulses cmd+shift+N and drag the bunch in
cmd+shift+W for IR window
Left window to 0,3ms
Window Ref Time set manually to 0
Right window leave at 500ms
Apply windows to all

Export all Impulse Responses as WAV
24bit
Choose Export minimum phase Version of IR
Tick Normalize samples to peak Value
Tick Apply IR window before export

When looking at the wav. The data before the IR window is correctly missing, but the peak starts at 4080-4093 samples into the audio file.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
The minimum phase IR is not the measured IR. It is an IR which has the same frequency response magnitude but otherwise will be quite different, specifically it will have a different phase response and will always start at t=0 (otherwise it would not be minimum phase) so will not be what you captured. Export the measured IR.
 

Finnmaker

Registered
Thread Starter
Joined
Sep 20, 2022
Messages
5
Ok. Well that seems to get rid of the time delay. Thank you!

But I still don't understand why this behaviour has changed between versions. Previously the MP IR would export starting from the cutoff point of the IR-window, if so specified. And it is what I have used previously with success in terms of sound. Now there's this added delay in the beginning of the file compared to previously same export options.

The minimum phase IR is not the measured IR. It is an IR which has the same frequency response magnitude but otherwise will be quite different, specifically it will have a different phase response and will always start at t=0 (otherwise it would not be minimum phase) so will not be what you captured. Export the measured IR.
 

Finnmaker

Registered
Thread Starter
Joined
Sep 20, 2022
Messages
5
Also the point of using the minimum phase has been that I can sum multiple microphones from multiple cabs and distances, knowing that the phase relations between those are exactly that, minimum. I won't have as large phasing effects when blending them.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
Also the point of using the minimum phase has been that I can sum multiple microphones from multiple cabs and distances, knowing that the phase relations between those are exactly that, minimum. I won't have as large phasing effects when blending them.
The minimum phase version of the IR doesn't just have delays removed, it is a different response. It is likely to sound different, because although it has the same frequency response magnitude it has a different phase response. If you need to remove time delays Estimate IR delay is probably a safer way to do that.
 

Finnmaker

Registered
Thread Starter
Joined
Sep 20, 2022
Messages
5
Funnily enough, in the guitar cab applications I've used it, I haven't noticed a significant difference between the MP and measured response. I've always AB-tested the results I've gotten and they're usually pretty spot on, when comparing.

Thank you very much for the answers! I made a small donation as thanks for your time and quick response.
 
Top Bottom