# REW Impulse exportation problem



## Paky33 (Apr 11, 2009)

Hello to all.
I noticed a problem with REW .
If I capture the sweep with the procedure for calibrating a stereo REW and FIR filters may do next with the DRC , it happens that the centering of the pulse made by the DRC is positioned exactly at the value set by the frequency of the filter.
That is: if I make an acquisition to 96KHz impulse response with REW , once made the convolution , DRC centers the two pulses exactly at 96000 ! Whether for the right channel for the left one.
According to Dennis Sbragion , this means that REW centers before the pulse and then Export. This makes exactly 1 second before the center . So DRC is centering on the same sample rate of acquisition of the pulse.
In this way, the DRC is the center of the pulse always to a
number of samples exactly equal to the sampling frequency.
This creates a temporal misalignment between the two channels .
I think should be resolved with the next version ......


----------



## JohnM (Apr 11, 2006)

Internally REW stores impulse responses with 1 second of data to the left of the peak. When exporting impulse responses as WAV it simply writes that data to a WAV file, so there is always 1 second of data before the peak. 

Can you describe how you would like the IR export to work?


----------



## Paky33 (Apr 11, 2009)

According to Dennis Sbgragion, the non-centering of the two pulses prevents a proper time alignment of the FIR filter. This leads to a mismatch between the two channels which results in a poorer quality of the treble.
What would be fair is that the export of the impulse fullfil the highest peak detected so as to allow a more accurate centering and a better temporal alignment of the two channels.
Why REW places the center of the impulse at the same rate established for the training of the filter? What is this?


----------



## JohnM (Apr 11, 2006)

Paky33 said:


> the export of the impulse fullfil the highest peak detected


I don't understand what you mean by that.



> Why REW places the center of the impulse at the same rate established for the training of the filter? What is this?


REW places the peak 1 second after the start of the WAV file.


----------



## Paky33 (Apr 11, 2009)

What I mean is that the DRC correct a temporal misalignment within a maximum of 8 samples.
If the REW I placed the two peaks to 1 second start of the WAW file, I will always have a time alignment correct answer. How does DRC to see if there is misalignment if the values ​​of the peaks are the same for the two channels?

This is what is written in the DRC : " 4.6.5 Interchannel time alignment

First of all the current DRC release INTERCHannel *Is Able to compensate for misalignment of only few samples , no more than ± 8 with the default configuration files. *Furthermore aligned accurate time measurements must be supplied , using either the glsweep lsconv and tools with a reference channel or some other tool providing the same degree of accuracy.

To get this limited time alignment you have to execute the Following steps :

1.Execute DRC on one channel as usual . At the beginning of the DRC output on screen you will see a line like this one :
Impulse center sample found at 1.36728 million .
Take note of the impulse center value.

2.After DRC has finished prepare the configuration files for the other channels as usual but change the parameter to BCImpulseCenterMode M and the BCImpulseCenter parameter from 0 to the value of the impulse center before Noted for the first channel. This way DRC will use the value of the impulse center of the first channel as a reference for the other channels and will compensate for any misalignment with respect to the first channel. If channels are misaligned blackberries than few samples this will cause errors in the correction filters , usually causing a rising frequency response , and so a bright sound ".

Unless the REW not align the two channels, I think there is a problem.


----------



## EarlK (Jan 1, 2010)

- REW can auto (re)set the highest impulse peak of any capture, to occur at; T=0 ( an option found within the "Estimate IR delay" daughter window, in the IR tab/button >>> "Controls" button ). If the captures of both channels ( left & right ) are exported with their IR occurring at T=0 , then that should satisfy the criteria ( you previously laid out) .

- One can also accomplish manual offsets ( before deciding to export to wave ) from within the IR's window, "Control Button".

- Set the IR to T=0, before exporting to Wave to create your stereo sample alignments / ( also, "normalize" any sample exported ) .

See my pic .

- Perhaps the problem here is really just a lack of familiarity of REW's feature-set .

If you still can't get ( the original ) DRC to work correctly, then simply buy a commercial offering, such as   ////*or*\\\\


----------



## JohnM (Apr 11, 2006)

EarlK said:


> - One can also accomplish manual offsets ( before deciding to export to wave ) from within the IR's window, "Control Button".
> 
> - Set the IR to T=0, before exporting to Wave to create your stereo sample alignments / ( also, "normalize" any sample exported )


I'm afraid that doesn't work with exported WAV files, they are always exported with 1s of data ahead of the peak. 'Moving' the IR just changes the start time assigned to the data, updating graphs accordingly, the data is largely unchanged ('largely' because there are some changes for fractional sample moves, but beside that the peak remains where it was in the data record within 1 sample period).



Paky33 said:


> How does DRC to see if there is misalignment if the values ​​of the peaks are the same for the two channels?


You won't be able to do that with REW's impulse WAV exports, but then REW wasn't designed to be a front end for DRC 

You could manually trim samples from the WAV files using Audacity or similar, based on the difference in IR peak times shown in REW (assuming you have measured in REW with a loopback connected to provide a timing reference). I'll add a feature request to allow the start time of the exported IR to be specified during the AV export, that would preserve relative timing.


----------



## EarlK (Jan 1, 2010)

Pasquale,

Since you want to play around with "digital room correction" ( specifically the original DRC as developed by Dennis S. ) , read this thread  called; "*Advice needed on room correction software"* .

Within that thread are some links to Digital Room Correction Designer ( by Alan Jordan ) . 

DRC Designer is a fully realized, self-contained program ( for executing drc ) . It is really a follow-up to Dennis Sbragion's original work ( meant for the likes of you & I ) . 

There are two versions available ( for the PC ) . One is a self-contained .exe file that was compiled from the original Java-based program . Follow the links provided by AudiocRaver to download that version .

The original Java based version is available from Alan Jordan's website ( to which I provided a link ) .

:sn:


----------



## Paky33 (Apr 11, 2009)

EarlK said:


> Pasquale,
> 
> Since you want to play around with "digital room correction" ( specifically the original DRC as developed by Dennis S. ) , read this thread  called; "*Advice needed on room correction software"* .
> 
> ...


Thank you! I did not know this program!:T


----------

