# Timing reference with USB Mic



## turboman (Mar 18, 2013)

I have an UMIK-1 USB microphone, and use a laptop with HDMI output and ASIO drivers.
I am a beginner and started to use REW a few weeks ago. Very soon I noticed the problem not having a timing reference with a USB microphone. I saw several threads and also a comment from John that this is not possible with a USB microphone.
I wanted this feature to do proper timing between different channels.

After I discovered that I could make an output on two channels in parallel, using ASIO and HDMI with one channel on "output" and the other channel on "timing reference output", I thought of following idea for having a timing reference.

Make a parallel output for channel 1 and channel 2. First a weep is made on channel 1 while channel 2 gets no input, followed by channel 2 getting a sweep with no input on channel 1. The timing difference between the two sweeps is then known. If REW could then process the sweeps, it could offset the second sweep by the timing difference and both channels are then in proper timing.

As I said, I am a beginner, but would this be an interesting idea?
John, any comments?


----------



## JohnM (Apr 11, 2006)

Yes, that is good thinking - it amounts to generating a reference signal on one channel followed by the measurement signal on another, designating one speaker to act as a timing reference for the others, which is on my list of things to look at for exactly this situation. A refinement is that the reference signal can have a different spectral content and duration to the measurement sweep as its purpose is timing accuracy rather than response accuracy.

An alternative solution in the meantime is to drive a speaker or drive unit from the reference channel and place it very close to the mic, the measured impulse response would then show an initial peak from the close driver followed by the main peak from the speaker being measured. Some care is needed with the level of the nearby speaker, but beside that this method can work - it works best if the ref channel drives a speaker that has little or no low frequency response (e.g. using a tweeter) so that the impulse response of the ref unit has short duration and does not run into the response of the speaker being measured.


----------



## charlieblue (Aug 17, 2013)

I don't get it. The "in the meantime" procedure, that is...

Say the speakers are roughly placed in the room and the goal is to make them sing as one, be that with micro-placement or digital delay. Might be front or rear speakers, or some speaker & sub combo to be matched through band limited sweeps (like laser suggests). 

Now, moving one speaker out of the arc / circle and close to the mic, to be used as ref.channel, simply ruins the placement.

So, all system speakers should be left at their regular positions and a different driver, not residing in the sound system itself, should be used as a ref.channel.

What am I missing here? 

John,

Wish you had more time to finish that USB-timing-reference-via-1-system-speaker REW version ... : )

Kind regards,

Charlie


----------



## calraith (Apr 13, 2014)

Hey John, is this idea possible? For sweeps, at every X samples sent, REW sets a timestamp on that particular frequency, then stops the stopwatch when the mic records it. For pink / white noise, inject a keyed mile marker of sorts every X samples, and REW measures the duration between mile marker sent and mile marker heard by the mic. Average those, and there's your delay. Thus, you might eliminate the need for a loopback to use as a reference in some circumstances.

I concede that such tricks might not be accurate enough for time domain measurements, but it would help with measuring speaker distances I think -- for example, when determining the difference in delay between dual subwoofers. Is this a foolish idea?

I apologize if I'm out of line. I'm thoroughly a neophyte in acoustic measurements. Be that as it may, I've really enjoyed learning, and I sincerely appreciate all your time and hard work.


----------



## JohnM (Apr 11, 2006)

Wouldn't really help, there remains an unknown and variable latency between REW asking the audio system to start generating the test signal and something actually appearing at the audio output - that can be substantial (tens or even hundreds of ms). There is another trick that Holm uses, its 'keep audio active' option, which basically keeps the audio interface running (sending it audio data, even if silence, and capturing audio data from it) for as long as the program is running, in which case a running sample count can be kept to reference subsequent measurements to the first measurement taken. That might be another option, though it only allows measurements to be referenced (timing wise) to the first measurement made in any given session so it wouldn't be possible to compare measurements made in different sessions.


----------



## orangeart (May 21, 2013)

That sound like a good plan John. Any idea when you might be able to get that implemented? I'm itching to get my active DSP system drivers properly in phase!


----------



## JohnM (Apr 11, 2006)

I don't know when I'll get to that, working on REW is something I do in my copious (I wish) 'spare time' and there are a lot of things on the todo list.


----------



## calraith (Apr 13, 2014)

Edit: Well, I thought I figured out a workaround for a loopback when using a USB mic, but it appears there is no magical hackery than can substitute for using the same I/O devices for loopback as are used for measuring, at least with the current version of REW.


----------

