REW Beta Release REW API beta releases

Hi John,

I often find that when measuring in highly reflective environment like inside the car cabin, it is difficult to align the impulse responses (IR) without eye-balling and manually aligning each one. It becomes very tedious if there are many measurements to align for the purposes of designing FIR filters with the currently available options (Time align, Align IR start and Cross corr align). It would be appreciated if you consider adding another option to align IRs based on a chosen impulse slope rise threshold of a certain percentage, say 10%, 20% or user adjustable.

Let me illustrate, below are screenshots where I try to align impulse response of sixteen measurements taken in the car with the microphone spaced 10 cm apart in a square horizontal plane. In the first 4 pictures, I have removed 13 measurements to illustrate the issue a bit more clearly.

Original IRs before alignment
Snap1.png


IRs after using Align IR start option
Snap2.png


IRs after using Cross corr align option
Snap3.png


IRs after using Time align option
Snap4.png


As shown above and below with all sixteen measurements enabled, using the Align IR start option seems to work well until I inspected the IRs more closely.


Snap5.png


The rise slopes of the IRs are slightly missaligned using Align IR start option.
Snap6.png


The option that appears to achieve what I needed was to individually align the IRs using their initial slope rise with the cursor placed at 10% and selecting the Set t=0 at cursor option. This produces the IR alignment shown below.

Snap7.png


I tried to upload the .mdat file but it is too large, here is the link https://drive.google.com/file/d/1GJGmGtm7zl-0I38dUFjqMk9joItNNW4_/view?usp=sharing
 
Last edited:
There are two factors at play. The first is that working out the IR start is difficult, particularly where the IRs have small fluctuations before what we would choose as the "correct" start. The second is that the IR start is determined by examining the raw data samples, so the precision is determined by the sample rate, leading to variations of 20 us or so for your 48 kHz data. When you manually set t=0 using the cursor you are interpolating between samples and achieve better precision. I am reluctant to change the algorithm, as impulse responses vary a lot and it is pretty reliable as it is. However, there is a way to reduce your manual effort. After doing the IR start align, change the IR windows for the responses to cover the rise they have in common at the start, for example you could set the left window to 0.1 ms, the ref time to 0 and the right window to 0.1 ms and use "Apply windows to all". You can then use the cross correlation alignment, which aligns the windowed data, to better align the responses. Remember to restore meaningful windows afterwards, of course.
 
That is a nifty trick and thanks for the suggestion; I tried it on a few measurements and it works well.

However on DSP processed measurements the suggested process does not work as intended. Below is the screenshot of sixteen measurements processed using FIR filters for a more linear phase response The process does not work well due to IRs containing acausal info. I had to eye ball the IRs as described in my previous post to align them before calculating the average respons using the RMS + phase avg. function.

An additional IR alignment option to achieve this could be beneficial and would be appreciated if you could consider it. For your refence, here is the link to the .mdat file of the IRs shown below, https://drive.google.com/file/d/1dxgNR-VHKWkkHkTNDZbupm-ZTAsL4E3M/view?usp=sharing.

Snap1.png
 
Back
Top