# Export Impulse response delay time



## germainsimon (Jun 16, 2011)

Hello,

I have a question regarding the export of the impulse responses.
When I export (text or wav) an impulse response it always centers it at 1s (first peak at 1s).
I am looking for a way to have the real time response as I would like to do time alignement between speakers.
thank you for you help.

Best regards,

Germain


----------



## JohnM (Apr 11, 2006)

You need to select "Use loopback as timing reference" on the Analysis preferences and connect a loopback from the unused soundcard output to the unused soundcard input, REW will then align the measured impulse responses according to their absolute time of arrival.


----------



## germainsimon (Jun 16, 2011)

Hello,

Thank you for you very quick answer.
Unfortunately,this was selected already. I expected that from this option. But it still centers every single measruement at 1s.
Do you have any idea why it does this?

Best regards,

Germain


----------



## JohnM (Apr 11, 2006)

Thinking about it some more, the problem is that REW always allows one second of data ahead of the peak and sets the impulse response start time to show the peak at the correct location on its graphs, but when the impulse is exported that knowledge of the start time, and hence where zero time should be, is lost. A workaround could be to use the time of the peak from the impulse response plot (or from the measurement info panel) and shift the exported responses correspondingly in a waveform editor.


----------



## germainsimon (Jun 16, 2011)

Hi again,

Is there any possibility to eliminate this export issue in a next version or is this out of your scope for now?

thank you, 

Best regards,


----------



## JohnM (Apr 11, 2006)

I've added a feature request to allow IR export between specified times, which would preserve the absolute time chosen as the start point. I can't say when it might be implemented though.


----------



## germainsimon (Jun 16, 2011)

Great!
I'm looking forward trying this one!
Have a good day

Regards,

Germain


----------



## germainsimon (Jun 16, 2011)

Hi,

I've got another question about impulse response.
I don't understand why no matter how long the measurement time is, the length of the impulse response seems to be always the same, i.e. around 2.7 sec.
Could you please give me some explanations?

Thanks


----------



## JohnM (Apr 11, 2006)

REW calculates a block of 128k samples, which at 48kHz is 2.73 seconds. Within that block the impulse peak is 1 second from the start. To see how long the impulse response itself lasts you need to look at the response on the dB FS scale and see where the response has fallen fully into the noise floor of the measurement. 

Using longer measurement sweeps lowers the noise floor of the result because the test signal has correspondingly higher energy than the background noise, so the signal-to-noise ratio of the calculated impulse response is better (approximately 3dB improvement for each doubling of the excitation signal length). The impulse response itself does not get any longer (though you may be able to see a little more of it) because by definition it is how the room would respond if it were excited by an impulse.


----------



## LMO (Sep 1, 2010)

This is not exactly what REW was intended for, but I thought I'd ask anyway. I imported an impulse response sampled at 48K that has 6001 sample points. When I generate the minimum phase response and save it, other than the shift in time the saved response appears the same as the imported response. 

Does the min phase function only work with impulse responses created within REW?


----------



## JohnM (Apr 11, 2006)

LMO said:


> I imported an impulse response sampled at 48K that has 6001 sample points. When I generate the minimum phase response and save it, other than the shift in time the saved response appears the same as the imported response.


If you want to export the minimum phase IR you need to use the latest V5.01 beta and check the box labelled "Export Min Phase Version of IR".


----------



## LMO (Sep 1, 2010)

JohnM said:


> If you want to export the minimum phase IR you need to use the latest V5.01 beta and check the box labelled "Export Min Phase Version of IR".


Understood--that is what I did. I'll redo it tomorrow to confirm.


----------



## LMO (Sep 1, 2010)

I started from scratch today, and did not get the same results. Now the saved original and min phase responses are different, as expected:


----------



## JohnM (Apr 11, 2006)

That looks suspiciously like a wrap at the peak to me, could you post the mdat file of the measurement and say what export parameter settings you used, please?


----------



## LMO (Sep 1, 2010)

Export Impulse Response as Wave: Mono, 24-bit, Export Min Phase Version of IR
Normalise and Apply IR Window were not checked. 

Here is what it looks like with the above settings, and below with normalisation turned on.


----------



## JohnM (Apr 11, 2006)

Thanks, the min phase converted data can exceed full scale if the original data has values at or close to full scale, I've made sure the export stays within range in that case for the next release. In the meantime exporting normalised avoids the problem.


----------

