# Loopback as timing reference issue



## archangelofguitar (Apr 14, 2016)

I just downloaded REW's latest version...I have a Focusrite Clarrett 8PreX interface connected via Thunderbolt to my Macbook Pro. Avantone Mix tower powered speakers. Dayton EMM-6 (calibrated). I'm trying to figure out how to get a "System Delay" calculation made. I've imported the mic calibration file, calibrated the soundcard on the interface, calibrated the SPL meter, and have run measurements...but for each measurement when I open the info panel, system delay says "not available." And I know there has to be some latency in my computer and interface to compensate for! The tutorial says you can use the loopback as timing reference, and I have my first line output connected to my first line input, the same mic input I'm using for measurements - but how do you actually get the program to calculate the system delay and incorporate it into the measurements?? Maybe it's just me being new to this, but I've read the manual anytime this feature comes up, and it doesn't seem very clear. Any help would be much appreciated!


----------



## jtalden (Mar 12, 2009)

With 'loopback timing' activated the location of the impulse on the impulse chart = the time of flight + the measuring system latency in ms. 

Loopback timing is not used for EQ purposes so that feature can be turned off if that is the reason for the measurements.

Loopback timing can be useful if you are aligning drivers in a speaker (DSP XO), or finding the exact equidistance position of the mains, or timing the mains to a SW. It depends on your objective and the process you intend to use. 

The actual measuring system latency by itself is not needed for most all common purposes, but it can be obtained if it is needed for some reason.


----------



## archangelofguitar (Apr 14, 2016)

Ok! Thanks for the reply jtalden. I follow what you're saying about the loopback connection. I'm just making initial measurements of my room before I add acoustic treatment, and I want to see the results before and after. I'm not utilizing Eq, aligning drivers, or timing mains to a SW. 

However, I'm looking at the bottom of page 8 of the tutorial which says:

"The other input and output channels do not need to be used for basic measurement. The response of the soundcard itself
can be compensated for by taking a reference measurement with the output connected directly to the input and configuring
REW to subtract that measured response from subsequent room measurements. However, it is also possible to use a
loopback connection from the soundcard's left output to its left input as a timing reference for REW to automatically
compensate for the time delay in the soundcard and operating system when it makes a measurement. A timing reference is
required to make correct phase measurements, to compare time delays between measurements or for getting speaker delay
settings correct in multi-channel systems."

Obviously, if I do several measurements in a row, they'll all have the bias of the same system delay. From this, I'm gathering that REW doesn't naturally use this compensation and a value must be entered or calculated. 

page 93 - "If a loopback was used as a timing reference the System Delay figure (which can be viewed in the
measurement Info panel) is shifted by the same amount as the zero time." But, it still doesn't describe how to have REW calculate the system delay. 

page 97 - "Delays in the PC or soundcard can be eliminated by using the Use Loopback as Timing Reference option in the Analysis
Preferences."

page 158- "REW only uses one soundcard channel to capture the output of your SPL meter or mic preamp, the
Input Channel control tells REW which channel you have connected to. The default is the Right
channel. If Use Loopback as Timing Reference has been selected in the Analysis Preferences the
other channel will be used a reference to eliminate time delays within the computer and soundcard,
this requires a loopback connection on the reference channel."

So with my interface I have outputs 1 and 2 being sent to my monitors, and my mic is going to input 1. Is it possible for me to use a loopback connection and still run room measurements then? 

My biggest concern is if system delay isn't being compensated for, then I question the accuracy of the measurements due to phase misalignment of output and input signals.


----------



## jtalden (Mar 12, 2009)

Yes, it is confusing as there is 'loopback timing' and also 'loopback calibration of the soundcard'. You did the loopback calibration of the soundcard so that is taken care of.

I did not visit the tutorial to review the quotes you cited, but assume that they are correct within the context of the subject they are discussing. They are misleading within the context of before vs after analysis of room treatment changes. Loopback timing is not needed for that purpose. 

When loopback timing is left disabled, REW automatically locates the impulse response (IR) at 0ms. This is effectively removing the measuring system latency. REW also sets the IR window very wide by default. This means the SPL, ETC, waterfall and spectrogram plots will be accurate. The SPL measurements will be directly comparable in the 'All SPL' or 'Overlays' views. 

Note that any small change of the mic position between measurements will have some impact on the SPL response so some experiment with mic positions would be good to get a feel for nature of that impact. Otherwise room treatment changes may be thought to be responsible for changes due to the mic position. This is more meaningful for the higher frequencies than the bass range. If you are measuring higher frequencies for room treatment changes then the mains must be measured separately, not as FL+FR. Assuming SW response is the focus then small mic location changes are not a significant impact.


----------



## archangelofguitar (Apr 14, 2016)

jtalden, thanks so much for that clarification. I think you're correct in that I was confusing the two ideas. After reading this paragraph on realtraps website, I was a little stumped. 

"As with most room measuring software, REW uses a sine wave sweep as its signal source. There are many advantages to using a sine wave sweep versus pink or white noise. The main advantage is a sweep offers a higher signal to noise ratio. When the software analyzes the sweep as recorded through your microphone, it can apply a tracking filter to the recorded tones. This is a sweepable filter that is applied internally by the software as it analyzes the recorded sweep. The filter passes only the frequency of interest at that moment, thus filtering out other sounds such as loudspeaker distortion, preamp hiss, your own breathing, and footsteps or outdoor traffic and barking dogs."

The reason I was worried so much about the loopback timing is because if the internal tracking filter is out of sync with the actual timing of the sweep occurring a few milliseconds later, then everything would be skewed. But, I believe it's all based on the input that's coming in from the microphone that the internal tracking filter is being applied - not necessarily synced directly at the same time with the sweep REW is outputting as a signal, so system delay isn't needed to be compensated for. Correct?

I completely understand what you're saying when it comes to mic positions and measuring high frequencies vs low. I don't have a SW, though. I'm using two full range monitors. But you have me curious now (and perhaps this is in another forum), but why do you say for higher frequency measurements that each monitor be measured separately rather than together?


----------



## JohnM (Apr 11, 2006)

The option to turn on using a loopback connection as a timing reference is in the Analysis preferences. It doesn't make any difference to how REW makes its measurements, however. Log sweep measurements use a convolution process to recover the impulse response, latency is dealt with automatically. There is no tracking filter (tracking filters are a feature of Time Delay Spectrometry, TDS). Timing references are useful when the relative timings of different measurements need to be compared, such as looking at the time alignment between drivers during speaker design, but aren't needed otherwise.


----------



## archangelofguitar (Apr 14, 2016)

Thanks for the clarification, John. So just to be clear, the quote I took from realtraps website about the tracking filter (which apparently there isn't one) - is not technically correct? I think it would help realtraps customers understand REW more properly if it's not described this way on their website. I can pass the word along to their manager as I just purchased a few traps from them.


----------



## jtalden (Mar 12, 2009)

archangelofguitar,
Yes, REW sweep measurement mode offers higher S/N and does indeed automatically account for any normal measurement system latency conditions - no worries. The sweep mode also provides an IR and thus more options for analysis. It is thus well suited for mid and high frequency room treatment efforts. 

I was thinking that single channel measurements would be advantageous. It's easier to locate and address points of early reflections. I suppose that if you are addressing more general room conditions sweep averages or RTA averages may be helpful also. I defer to others with more room acoustics experience on this point.


----------



## bmmoser (Mar 26, 2016)

Archangelofguitar, I believe you (and REW's instructions!) may be in error.

Even using some type of a loopback (dual channel measurements), there are of course always going to be delays (latency) in the signal path. This is not a problem per se, but in other posts it has been pointed out that

You cannot guarantee that the delay will be a constant from one measurement to the next. This is particularly true if you are using a software DSP such as (in my case) JRiver Media Center.

Now, it "should" be true that each channel will have the same relative delays, comparing one to another. Otherwise all hope for listening to faithful stereo or multi-channel sound is out the window 

In other words, usually everything is ok if each channel is delayed by the same amount. As I understand it, the problem arises if you assume that delay is going to be "X" every time. Can we be sure? I say not (unless testing proves otherwise of course.) I offer the following as a "thought experiment" proof to support my doubt.

Measurement #1: has delay of X msec. Dual channel (reference ch.) has the same measurement.

Before measurement #2, you added a couple more DSP filters ( = more processing required = more cpu time); now the measured delay will almost certainly be different, call it Y. 

You can see the mistake that will be made if you assume X for subsequent measurements.

Solutions? If a reference channel is available, maybe it is not a problem after all...if each measurement has a new delay computed based on the reference loopback compared against the mic's measurement. But again, you * may * run into errors if you have added DSP ( and more potential delay) to channel 1 but no changes to the reference channel (#2).

I've not seen this suggestion, but might this be the ideal solution: instead of (say) calling channel 2 output and channel 2 input the reference loopback channel, why not take a bridged (parallel) measurement of channel 1's output (the sweep output) and loop this to channel 2's input? 

Sent from my NV570P using Tapatalk


----------

