INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: What is the best way to use REW to measure jriver?  (Read 12010 times)

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
What is the best way to use REW to measure jriver?
« on: January 18, 2014, 01:34:20 pm »

I've read a few threads on this and it's not obvious to me at all what the best way forward is.

What I want to achieve is;

- Use REW to measure/tweak my in room response from jriver
- Use REW with a loopback timing reference so I can confirm time alignment

So far, I have the following setup

htpc -> firewire -> focusrite saffire pro 24 -> 6 lineouts to processor mc inputs

I then have it configured as follows

default playback device = nvidia hdmi
rew set to use java driver + output to device device + input from my saffire pro 24
jriver running wasapi loopback

To measure L or R alone, I can then run a sweep in REW and mute 1 or other channel in saffire mixcontrol. This works fine so far as it goes but I don't have a way, as far as I can see, to get a loopback timing reference going here.

I do have spare inputs (3 analogue, 1 spdif coax) and outputs (1 spdif coax) as well as an optical connection that can hook other devices up via adat (I don't have another device that can be connected via ADAT atm but if it is the easier way forward then I'll get something) so it seems like I should be able to get something going to provide a loopback but I don't really understand how to do it.

I have read threads on ASIO line in but they confuse me atm. Would it be something like

- set REW to output to some unused output channel
- route that channel to loopback 1 in mixcontrol
- select that loopback channel as the ASIO line in channel in jriver
- measure as normal from that point

if so, I'm still not clear how I'd do a timing reference in this setup nor how to determine how the channel numbers presented to jriver correspond to the channels exposed by the driver.

Guidance would be appreciated!

Thanks
Matt
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: What is the best way to use REW to measure jriver?
« Reply #1 on: January 18, 2014, 02:06:04 pm »

I've read a few threads on this and it's not obvious to me at all what the best way forward is.

What I want to achieve is;

- Use REW to measure/tweak my in room response from jriver
- Use REW with a loopback timing reference so I can confirm time alignment

So far, I have the following setup

htpc -> firewire -> focusrite saffire pro 24 -> 6 lineouts to processor mc inputs

I then have it configured as follows

default playback device = nvidia hdmi
rew set to use java driver + output to device device + input from my saffire pro 24
jriver running wasapi loopback

To measure L or R alone, I can then run a sweep in REW and mute 1 or other channel in saffire mixcontrol. This works fine so far as it goes but I don't have a way, as far as I can see, to get a loopback timing reference going here.

I do have spare inputs (3 analogue, 1 spdif coax) and outputs (1 spdif coax) as well as an optical connection that can hook other devices up via adat (I don't have another device that can be connected via ADAT atm but if it is the easier way forward then I'll get something) so it seems like I should be able to get something going to provide a loopback but I don't really understand how to do it.

I have read threads on ASIO line in but they confuse me atm.

Guidance would be appreciated!

Thanks
Matt

The recommended method is to plug one of the physical line outputs of your audio device (the saffire pro) into one of the inputs of your audio device (i.e. a literal cable loopback) and then run the calibration.  If you leave all of your settings intact, JRiver's loopback would be included in the chain as it's part of your setup (sound must pass through it in order to reach the output).  It's important that you run the calibration more or less the same way you plan to be measuring, if you see what I mean.  So maybe just unplug your Left channel line out and loop that into one of your inputs and leave the settings as is.

That said, in my experience, you're probably not going to be able to get a consistent loopback time alignment using the Java drivers in REW.  The loopback time alignment (meaning the time alignment of the whole system, not just JRiver's loopback module) is variable over time, even with the same equipment.  I can measure twice with the same equipment on the same day and get a different loopback latency.  And the loopback doesn't account for any "time-of-flight delay" (i.e. the time it takes the sound to reach your microphone), so if you were planning to rely on the loopback to set your impulse time zero for you, it would still be wrong by milliseconds.

Depending on what outcome you're trying to achieve with the loopback time alignment, I may be able to suggest easier/more reliable measurement methods.  Are you trying to:

1) Get the delay set on a bi-amped system with an active crossover  
2) Trying to get a surround system time-aligned,
3) Just trying to make sure your phase measurements in REW are correct, or
4) Something else?

Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: What is the best way to use REW to measure jriver?
« Reply #2 on: January 18, 2014, 02:39:34 pm »

The main thing I have used loopback for is aligning sub to mains and then verifying the alignment of the mains to each other so I suppose that is option 2 (though the sub/mains aspect has shades of option 1). I wanted to avoid the physical line output as the saffire only has 6 outputs so they're all connected (and my kit is in a rack under the stairs so it's quite inconvenient to have to swap cables physically aka I'm lazy)

I'm uncertain at this point whether this will be necessary in future as I am in the process of moving over to acourate for eq but I can't say I'm remotely au fait with how that works yet hence it would be nice to have something to hold onto that I understand  :D
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: What is the best way to use REW to measure jriver?
« Reply #3 on: January 18, 2014, 02:55:57 pm »

The main thing I have used loopback for is aligning sub to mains and then verifying the alignment of the mains to each other so I suppose that is option 2 (though the sub/mains aspect has shades of option 1). I wanted to avoid the physical line output as the saffire only has 6 outputs so they're all connected (and my kit is in a rack under the stairs so it's quite inconvenient to have to swap cables physically aka I'm lazy)

I'm uncertain at this point whether this will be necessary in future as I am in the process of moving over to acourate for eq but I can't say I'm remotely au fait with how that works yet hence it would be nice to have something to hold onto that I understand  :D

You can't get a good loopback measurement on the interface without connecting an analog out to an analog in unfortunately.  If you ran a digital out to another interface, you'd be getting a loopback on the second interface's output clock, which wouldn't help you with your actual output device.  To be clear, the analog output delay on the Saffire is part of what you're trying to measure, unfortunately.

You don't really need the loopback timing reference to get your subs and mains aligned.  You can use the "greatest null method" to do that pretty easily, here's how:  
1) Invert the polarity of one of your mains or on the sub (but not both).  You can do this in JRiver rather than swapping the cables.

2) Then try adjusting your delay on the main or the sub in PEQ (but not both) until you have a 30dB null at the crossover point.  You can do this with pink noise/RTA running for greatest convenience, or you can run sweeps in between adjustments.  You want this null to be as deep as possible (i.e. tweak the delay until it starts rising again, and then go back).  

3) Restore polarity and Voila, perfect phase alignment at the crossover.  It works best with stereo subs obviously, but even if you have a single sub, it will get you close. You'll just need to measure with the other main as well and find the best "compromise" delay setting (i.e. a setting between what would be optimal for either speaker).  If you're crossing over low enough the wavelengths are long enough you may have more or less the same delay for both.  

I don't have a similar easy trick for getting the distance-delay sorted (i.e. getting the mains time-aligned to each other), but the largest source of differential delay in the mains is positional, so you won't go far wrong by just setting their respective distances from the main listening position in the Room correction module.  If they're roughly equidistant from the listening position, I'd leave it alone.  You can try this with the sub too, set it's physical distance in Room Correction to get it close, and then use the greatest null method to fine tune it.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: What is the best way to use REW to measure jriver?
« Reply #4 on: January 18, 2014, 05:24:59 pm »

OK thanks. I am v much liking the tweakability of jriver even if i invariably can't work out how to do something at first blush.

Why 30dB btw? It sounds specific enough that there is a reason behind that magnitude.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: What is the best way to use REW to measure jriver?
« Reply #5 on: January 19, 2014, 09:20:21 am »

OK thanks. I am v much liking the tweakability of jriver even if i invariably can't work out how to do something at first blush.

Why 30dB btw? It sounds specific enough that there is a reason behind that magnitude.

It's not necessarily exactly -30dB, that's just an order of magnitude and/or how it commonly presents.  Not sure how familiar you are with phase, but when two sources are exactly 180 degrees out of phase at a given location, they should (in theory) cancel each other completely, which would mean an "infinite" null:  http://www.indiana.edu/~emusic/acoustics/phase.htm

In practice, perfect cancellation is unlikely for a variety of reasons, but you should  see a pretty huge null when the two drivers are nearly perfectly out of phase with each other (25-30 dB is a typical null).  The key is that very few other phenomenon in audio will produce a null that deep (e.g. room effects, etc.) so it's a good indicator.

The idea of the method is that when two sources are perfectly "in phase" there's no destructive cancellation so the SPL level at the crossover is at its highest.  But it's really hard to tell whether the SPL level is incrementally higher at different settings that are almost correct so it's hard to get it tuned exactly.  By inverting the polarity (flipping the phase 180 degrees), you get an enormous null that's much easier to see, which makes it much easier to determine when you've reached the "optimal" point.  Does that make sense?  
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: What is the best way to use REW to measure jriver?
« Reply #6 on: January 20, 2014, 10:58:42 am »

Yes that does make sense, thanks.

That said, in my experience, you're probably not going to be able to get a consistent loopback time alignment using the Java drivers in REW.  The loopback time alignment (meaning the time alignment of the whole system, not just JRiver's loopback module) is variable over time, even with the same equipment.  I can measure twice with the same equipment on the same day and get a different loopback latency.  And the loopback doesn't account for any "time-of-flight delay" (i.e. the time it takes the sound to reach your microphone), so if you were planning to rely on the loopback to set your impulse time zero for you, it would still be wrong by milliseconds.
I meant to comment on this. IME REW loopback has been a consistently reliable means of getting accurately time aligned measurements using the java driver. I've used it to work out multiple sub positioning before, calculate the expected result using trace arithmetic and then days later verified the results once I had multiple subs in place. There are plenty of people on HTS who also use this feature for similar purposes so I'm not sure why your setup is inconsistent.

FWIW I also asked the Q about different methods of getting a loopback going on my equipment (albeit exc jriver) over on HTS, JohnM's view is that the driver/hardware side of it can basically be ignored.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: What is the best way to use REW to measure jriver?
« Reply #7 on: January 20, 2014, 02:43:47 pm »

Yes that does make sense, thanks.
I meant to comment on this. IME REW loopback has been a consistently reliable means of getting accurately time aligned measurements using the java driver. I've used it to work out multiple sub positioning before, calculate the expected result using trace arithmetic and then days later verified the results once I had multiple subs in place. There are plenty of people on HTS who also use this feature for similar purposes so I'm not sure why your setup is inconsistent.

That is odd.  To be fair, it's been quite a while since I tried it (more than a year), so it may be that it either works better now, or that I goofed something up when I tried it.  Next time I'm doing a speaker setup, I'll try it again and see if I get better results. 

Logged

natehansen66

  • World Citizen
  • ***
  • Posts: 239
Re: What is the best way to use REW to measure jriver?
« Reply #8 on: January 20, 2014, 05:23:48 pm »

I can vouch for using the timing loopback in REW with MC's loopback to capture the audio stream, I use it when designing crossovers. No way around the actual physical loopback to get the timing reference in REW though.

OP you might try using Holm Impulse if you don't have enough I/O for the physical loopback. Holm can do what REW's loopback can do without the physical connections. It's kind of a pain, and I've had some issues with consistency in the past but it's worth a look.

I've typed "loopback" so many times in such a short span that I'm even confused now  ;D
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: What is the best way to use REW to measure jriver?
« Reply #9 on: January 20, 2014, 05:38:47 pm »

I can vouch for using the timing loopback in REW with MC's loopback to capture the audio stream, I use it when designing crossovers. No way around the actual physical loopback to get the timing reference in REW though.

OP you might try using Holm Impulse if you don't have enough I/O for the physical loopback. Holm can do what REW's loopback can do without the physical connections. It's kind of a pain, and I've had some issues with consistency in the past but it's worth a look.

I've typed "loopback" so many times in such a short span that I'm even confused now  ;D

I'll second that, Holm is a great measurement suite.  I prefer Holm to REW as a measurement tool for a lot of reasons, but primarily because it supports frequency dependent windowing.  You can export Holm measurements into REW easily to take advantage of REW's EQ generator.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: What is the best way to use REW to measure jriver?
« Reply #10 on: January 21, 2014, 06:08:03 am »

OK thanks, I will take a look at Holm.

On the need for a physical loopback, I was thinking this morning about an approach using asio line-in. It feels (he says hopefully) like this should work, on paper at least, though I'm not sure how to point jriver at the right channel for the asio line in piece.

Configure REW to use the ASIO driver
Set REW output to DAW7
Configure mixer to route DAW7 to Loopback1
Open JRiver ASIO LineIn to read from Loopback1
Configure mixer to route DAW1 to Loopback2
Set REW input to Loopback2

I could tweak the last 2 steps to turn that into a timing reference input.

Any flaws in this scheme?
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: What is the best way to use REW to measure jriver?
« Reply #11 on: January 21, 2014, 06:28:57 am »

OK thanks, I will take a look at Holm.

On the need for a physical loopback, I was thinking this morning about an approach using asio line-in. It feels (he says hopefully) like this should work, on paper at least, though I'm not sure how to point jriver at the right channel for the asio line in piece.

Configure REW to use the ASIO driver
Set REW output to DAW7
Configure mixer to route DAW7 to Loopback1
Open JRiver ASIO LineIn to read from Loopback1
Configure mixer to route DAW1 to Loopback2
Set REW input to Loopback2

I could tweak the last 2 steps to turn that into a timing reference input.

Any flaws in this scheme?

The only flaw I can see is that it looks like you'd be bypassing the actual inputs and outputs on your sound interface, which are part of the delay you're trying to measure.  You'd probably get a good idea of the software delay introduced with your method, but part of the delay is the time it takes your interface to convert digital to analog and vice versa, and to travel through the analog stages on the inputs and outputs. 

Depending on your computer and interface the hardware latency may be trivial compared to the software latency, or it might be the other way around.  In my experience the software latency is more likely to be variable than the hardware latency, so you may still get good results with your method. 

Only one way to find out  ;D
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: What is the best way to use REW to measure jriver?
« Reply #12 on: January 21, 2014, 06:34:04 am »

The only flaw I can see is that it looks like you'd be bypassing the actual inputs and outputs on your sound interface, which are part of the delay you're trying to measure.  You'd probably get a good idea of the software delay introduced with your method, but part of the delay is the time it takes your interface to convert digital to analog and vice versa, and to travel through the analog stages on the inputs and outputs. 

Depending on your computer and interface the hardware latency may be trivial compared to the software latency, or it might be the other way around.  In my experience the software latency is more likely to be variable than the hardware latency, so you may still get good results with your method. 

Only one way to find out  ;D
I'll give it a try later, my earlier attempt at using asio line produced a most odd sound though. Do you know how I identify the channel number to pass to jriver?
Logged

dean70

  • Citizen of the Universe
  • *****
  • Posts: 508
Re: What is the best way to use REW to measure jriver?
« Reply #13 on: January 21, 2014, 03:24:24 pm »

OP you might try using Holm Impulse if you don't have enough I/O for the physical loopback. Holm can do what REW's loopback can do without the physical connections. It's kind of a pain, and I've had some issues with consistency in the past but it's worth a look.

Curious to know how you can do the loopback in Holm without a physical cable? This would be save big headaches pulling apart my system to connect cables to the back of the unit.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: What is the best way to use REW to measure jriver?
« Reply #14 on: January 21, 2014, 03:40:28 pm »

Curious to know how you can do the loopback in Holm without a physical cable? This would be save big headaches pulling apart my system to connect cables to the back of the unit.


Holm doesn't use a loopback timing reference, instead it has a time-lock feature, which will give you the offset between two successive measurements at a given mic position.  It does it by taking exclusive control of the output device and keeping an audio stream open in between measurements.

When I've tested it, it did a good job of determining the offset.  For example, using the timelock, Holm gave me the same offset delay for my bi-amped speakers that I determined to be correct using the greatest null method.  As noted above, Holm is occasionally a little flaky (sometimes I have to take a measurement twice), but usually it's pretty obvious when its misbehaving.

I'll give it a try later, my earlier attempt at using asio line produced a most odd sound though. Do you know how I identify the channel number to pass to jriver?

Not sure, but I've never used the ASIO line-in feature for anything.  Maybe someone else here has more experience with it?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: What is the best way to use REW to measure jriver?
« Reply #15 on: January 21, 2014, 06:12:05 pm »

Not sure, but I've never used the ASIO line-in feature for anything.  Maybe someone else here has more experience with it?
this worked perfectly (1st time!)

I actually RTFM'ed and this said that, at 44.41/48kHz, loopback is channels 15 and 16 so configuring REW/saffire mixcontrol as described and opening 1 channel with offset 14 (since it is a 0 based index) in the asio line in gives me the raw output of the DSP uncoloured by such pesky things as speakers and the room :)
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: What is the best way to use REW to measure jriver?
« Reply #16 on: January 21, 2014, 06:45:33 pm »

this worked perfectly (1st time!)

I actually RTFM'ed and this said that, at 44.41/48kHz, loopback is channels 15 and 16 so configuring REW/saffire mixcontrol as described and opening 1 channel with offset 14 (since it is a 0 based index) in the asio line in gives me the raw output of the DSP uncoloured by such pesky things as speakers and the room :)


I thought it might be a channel offset issue, but wasn't confident enough about that (and didn't know anything about your interface).  But I have a similar interface, so you've saved me some work if I ever want to set up that kind of software loopback  ;D
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: What is the best way to use REW to measure jriver?
« Reply #17 on: January 23, 2014, 09:23:50 am »

Just to wrap this up, I have added a physical loopback from the 2nd mic input to the headphone output, using asio line in means I can then choose DAW3 as the timing output (the headphone are on DAW3 and DAW4) and In2 as the timing input. This post contains some details of an oddity around the response of the virtual loopback but that seems to have gone away now after running the soundcard calibration.

The pics attached show the actual setup for reference.
Logged
Pages: [1]   Go Up