# Using REW In A Non-Real Time Setup



## MikeRivers (Feb 13, 2007)

I'd like to record a measurement sweep, then play it back to the program and get a frequecncy response graph. An example of this is to measure the respnse of a 2-head tape recorder, where when recording, the input come out the output, not the playback. 

The real application is to check for resonances in a disk cutter head where I'd record a test track on a disk, then play it back using a reputable cartridge to see how good a job the cutter is doing.

I tried playing back a recording in the Measurement mode, but I guess I haven't been able to get the timing right because the only thing that appears on the graph the portion between about 8 and 20 kHz. Ideally, I'd like to find a "measurement standby" mode that starts measuring when it detects the playback of the test signal starting.


----------



## JohnM (Apr 11, 2006)

Allowing import of offline files is one of the things on the todo list, but it isn't high on the list. People have had success with what you have been attempting, but there is only a second or so leeway to get it to work. If you are missing the low frequency part your playback is starting too late, or possibly your recording is missing the early (low freq) part of the sweep. You can get some hints by looking at the scope graph after you attempt a measurement to see how the captured audio is aligning, it is OK for it to end up to a second or so after the measurement sweep trace but it shouldn't end before.


----------



## MikeRivers (Feb 13, 2007)

Thanks for the quick reply and your continued support of your program. It's good to know that what I'm looking for has at least beenconsidered. 

I'll play around with the timing some more and see if I can find something that works.


----------



## jtalden (Mar 12, 2009)

*Here* is some information that may be helpful. I am not sure it applies directly to your situation.


----------



## MikeRivers (Feb 13, 2007)

jtalden said:


> *Here* is some information that may be helpful. I am not sure it applies directly to your situation.


That's a good tip about inserting a "count-off" ahead of a recording of the sweep using an audio editor program. I was going to play around with looking at the recorded sweep in a DAW anyway, knowing that I wouldn't get a frequency response plot, but at least I could find frequencies that were obviousl resonances, which is what I'm looking for.


----------



## MikeRivers (Feb 13, 2007)

I tried the suggesting of putting a count-off click ahead of a recorded sweep and playing it back into REW with some goofy results. The error message is "Impulse peak is not where it's supposed to be." After figuring out how to determine how long the measurement period was, I recorded a sweep the same length, and no matter when I start the playback relative to the measurement start, although the input meter looks good, I'm getting a graph with a bunch of noise ramping up from about -50 to -40 dB between 5 and 15 kHz and then it jumps up to about +15 dB and it's flat between 15 and 20 kHz. It looks like this:

http://i.imgur.com/iAf3Hue.jpg

At least with the current Beta version, I was able to set the graph reference level to 0 dB where I wanted it, so that's a little progress. But I've wasted enough time with this project for one day. I'll keep an eye out for any further suggestions and try again later.Here


----------



## jtalden (Mar 12, 2009)

I had to sort through this same problem when I was first working this out. My last hurtle was to get Audacity to export the file in the correct format, but I know there were other subtle issues at other steps as well. Unfortunately there are several settings that may be wrong in several steps. 

Once I got all the correct settings used to create the file, and used the same REW settings for the measurement, it works great for me every time. Once set up and working, any change to the REW freq range, sample rate, FFT length, or ?? (maybe one I forget) will cause just the type of error you mentioned. 

I would think my sample file should work if all the REW settings I mentioned in the other post are correctly set. If it works with my settings and file, but you need a different selection of settings I can try to create the file for you if you like.

This may not be your solution if you want something easy to setup or possibly there is something about your particular application? I don't fully understand all the potential pitfalls in your process so it may not apply in your case.


----------



## MikeRivers (Feb 13, 2007)

I'm not sure that you're doing what I'm trying to do. It makes complete sense to me that what I'm doing shouldn't work. At a given time, REW expects to see the same frequency that it's sending to the system under test, and unless the timing is exactly right, really to sample accuracy, it won't. 

When you record the REW sweep in Audacity, are you using a second computer to do that? Or using a driver that allows you to send the output of REW to Audacity? 

What I'm doing is recording the sweep (REW sound card output through an equalizer to make a frequency response that's not flat, to a hardware recorder, then importing that recording into Audacity, adding the count-in, copying it back to the recorder's SD card, putting it back in the recorder, playing it into REW, and clicking the Measure button at the end of the count-in. 

It just occurred to me as I'm typing this that I was using the REW Generator function set to sweep when recording the test signal. it's possible that the generator's sweep isn't exactly the same as measurement sweep, though it sounds like it. So I went back and tried recording the test sweep from the Measurement page. When I played this back into the sound card input, clicking the Measure button as close as I could to when the test signal started, and, by golly, this time I got a frequency response graph that overlays perfectly other than a slight level offset, with the response curve of the equalizer measured in real time (in line between the sound card output and input). 

So now that I've proved to myself that it works (at least once), all I need to do is convince myself that either I can start the measurement close enough to when the test signal starts, or that that it's not all that critical. 

Thanks for getting me thinking in the right direction, and eliminating what I didn't think was a variable.


----------



## jtalden (Mar 12, 2009)

Yes, I record an REW "measurements output" by routing the measurement output to Audacity rather than to speakers or other. I don't use the REW standalone "signal generator" as I don't think it applies the start and stop frequency selected in the measurement output settings dialog. I use the same REW/Audacity capable notebook PC and just change the REW output and Audacity input accordingly. I then add the ticks in Audacity and export the file as MS PCM at the correct sample rate. The file can then be played in foobar (or other player) to make an REW measurement. REW still generates a signal when it measures, but we just don't connect its output to anything. We instead route the foobar signal to the speakers. You apparently now have sorted through all this successfully. 

In my case REW captures and correctly plots the results of my entire chain; Foobar applied FIR filter/DLNA output, Oppo Player DLNA input, Integra Pre-Pro, DCX2496 XO/EQ filters, P-amps, and the speaker/room combination. 

In your case you could create the external signal the same way; with the ticks. That signal can be used for both stages. First play it to your hardware recorder (LP cutter). Then play the resulting LP back on the other device (LP cartridge/turntable) and have REW capture the output signal. REW will then chart the results. They will reflect the combined effect of the recording and playback processes used. Since you are capturing the cartridge output directly you may not be setup to hear the ticks during playback. If so, you can just watch for them on the REW level meter.

I wouldn't expect the modifications to the signal to make a difference as that is exactly what REW is designed to measure and report, be it a home theater system, or an LP cutter/turntable combination.


----------



## MikeRivers (Feb 13, 2007)

jtalden said:


> Yes, I record an REW "measurements output" by routing the measurement output to Audacity rather than to speakers or other. I don't use the REW standalone "signal generator" as I don't think it applies the start and stop frequency selected in the measurement output settings dialog.


When you select Sweep in the signal generator dialog box, you can set the start and end frequency as well as the total sweep time. In the Measurement window, you can also set the start and end frequencies, and while the sweep length is chosen from powers-of-2 numbers, it also reads out the time in seconds. So for a given measurement (I've been using the longest time), I set the generator to the same frequency range and time, and I get what appears to be the same signal that I record from the Measurement process (that gives me the goofy results). 

Since in your case where you're playing it back from a player that has some processing, you'll want to make the Audacity recording with the same digital parameters as you want your player to use. In my case it doesn't matter since I'm making my test sample from an analog output and sending an analog signal back to REW. Lacquer disks don't have a sample rate (though they don't always run at the same speed). And by the way, it's 78 RPM, not an LP. 

REW doesn't give me anything but my "sound card" physical outputs. I think that you're able to assign its output to Audacity because your sound card's driver allows for that. I had a Focusrite Scarlett here for a while that could do that, but I'm using a Mackie Satellite which was made before anyone thought of that concept. I suppose I could use Rewire or something like that, but I have no real need. 

Anyway, when I used the signal from the Measurement page instead of the Generator page, I was able to what I wanted (or rather, simulate it). If I had a grant, I'd study how much slop you had between starting the measurement and starting the recorded test signal, but for now I think I'll stick with what I have. 

Thanks for the insight. "Foobar applied FIR filter/DLNA output, Oppo Player DLNA input, Integra Pre-Pro, DCX2496 XO/EQ filters, P-amps, and the speaker/room combination" is out of my league. I'm pretty sure I understand your signal chain, and if that's how you're listening, it may be the simplest way to make your measurements. My inclination would be to eliminate Foobar and the Oppo (since that's reallly just serving as a D/A converter) and just test the analog part of the chain. But I recongnize that by going from the REW output to Audacity eliminates any contribution from the analog output of your sound card, which it appears you don't use. Too bad there isn't a DLNA driver for your Oppo player. That would surelyl get you a better analog signal than most computer sound cards.


----------



## jtalden (Mar 12, 2009)

MikeRivers said:


> Anyway, when I used the signal from the Measurement page instead of the Generator page, I was able to what I wanted (or rather, simulate it). If I had a grant, I'd study how much slop you had between starting the measurement and starting the recorded test signal, but for now I think I'll stick with what I have.


I'm glad you were able to get the measurements.


----------

