# REW on OS X, 48k vs 44.1k



## JohnM (Apr 11, 2006)

HifiZine said:


> One thing I noted is that on the Mac, setting the REW signal generator to 1 kHz produces 920 Hz; it needs to be set to 1088 Hz to produce 1 khz.


That's rather disturbing - a few questions
- Was the REW sample rate set to 44.1 kHz or 48 kHz? 
- Which OS X version are you running? 
- When looking at the tone on REW's RTA (with REW's sig gen set to 1 kHz) at what frequency does the peak appear?


----------



## HifiZine (Feb 7, 2013)

*Re: UMIK and SPL measurement*

Hi John, REW was set to 48 kHz, and I was running 10.8.2 on a Mac mini. The output was through the headphone socket. I'm fairly sure that the REW RTA window also showed the tone at 920 Hz, but I'll recheck this later today to be certain about what it's doing, and update. I will also try it on OSX 10.6.8.


----------



## HifiZine (Feb 7, 2013)

*Re: UMIK and SPL measurement*



JohnM said:


> That's rather disturbing - a few questions
> - Was the REW sample rate set to 44.1 kHz or 48 kHz?
> - Which OS X version are you running?
> - When looking at the tone on REW's RTA (with REW's sig gen set to 1 kHz) at what frequency does the peak appear?


I verified this again. With REW running at 44.1 kHz, no problem.

With REW beta 13 running at 48 kHz, the generated frequency is 920 Hz. OSX 10.8.2, Java 1.6.0_37. The RTA window shows a frequency of 920 Hz.

I also tried REW v5.0 (non-beta) on my laptop, OSX 10.6.8, Java 1.6.0_37, with the same results. Just as I finished up, I was offered an update to Java 1.6.0_39. Same result. So it doesn't appear to be new behavior with the beta.

Measurement sweeps are not affected. The driver on my desk has a distinct shape in the top octave. This is REW running at 48 kHz with the UMIK:










This is FuzzMeasure Pro (running at 44.1 kHz, EMM-6, for good measure):










The peak and dip are at the same frequency in both cases.

(I didn't run REW at 44.1 kHz because of the issue that I've seen noted in the beta thread about multi-channel input soundcards. I sold my two-channel soundcard before realizing this. FWIW I'm able to get signal into the soundcard with REW, visible in levels and RTA windows, but a sweep always fails, seemingly REW capturing the signal before it starts generating it.)

If there's anything else you would like me to test, please let me know

Thanks John


----------



## JohnM (Apr 11, 2006)

I looked further into this today. At first I could not reproduce the problem under 10.5.8 on my old Mac Mini. This turned out to be because I was using the Mandolane M3D output mixer, which does not suffer from the sample rate issue. When I uninstalled that, the problem showed up. I'm not sure how to fix it, however, since REW is asking JavaSound for a 48 kHz output and the line that is returned _says _it is running at 48 kHz, but clearly it isn't since the output sinewave is shifted down in frequency by 44.1/48 = 0.91875, so a 1 kHz tone comes out as approx 920 Hz.

For 10.5.8 (and perhaps 10.6) the Mandolane mixer fixes the problem, this is the installer I used for 10.5.8
View attachment MandolaneInstallV4_00.zip
but it is not compatible with 10.8. 

The Mandolane team donated their code to the OpenJDK project, so the problem might be fixed in the jdk8 preview builds (available at http://jdk8.java.net/) but I don't have a 10.8 installation to test that yet. It might also be fixed in the latest JRE7 builds, available at java.com.


----------



## HifiZine (Feb 7, 2013)

Hi John, I'll try installing JDK8 on the 10.8 machine and report back. Nothing ventured nothing gained!


----------



## HifiZine (Feb 7, 2013)

Hi John, I installed JDK8 on my 10.8.2 machine. There is no change 

java -version and the Java Control Panel both indicate that Java 1.8.0-ea is installed and operating, is there a way to confirm for sure that REW is using it?


----------



## JohnM (Apr 11, 2006)

If there is still an earlier JRE on the machine could uninstall it, but I would have expected the newest to be used by default. I should have a 10.8 macbook to investigate further in a few weeks.


----------



## JohnM (Apr 11, 2006)

Although the measurement sweep you made looked to be OK, I think you will find the impulse response looks pretty poor. The sample rate problem does also affect the sweep, but this is only really evident at low and high frequencies, with premature roll-off for both (an effect of the phase shift in the 48k sweep frequency components when reproduced at 44.1k). Even with the M3DMixer, which does give correct 48k output, the impulse responses look very poor - I suspect there is some 48k -> 44.1k -> 48k resampling going on in the audio path. On OS X JavaSound seems pretty unhappy when not running at 44.1k.


----------



## HifiZine (Feb 7, 2013)

Hi John

Hm yes, the impulse response doesn't look right at all.

I may have a (partial) workaround. I used LineIn (from RogueAmoeba - http://www.rogueamoeba.com/freebies/) and SoundFlower (http://code.google.com/p/soundflower/). With REW set to 44.1 khz, LineIn passing data from the UMIK to the SoundFlower 2ch input, and REW set to read from the SoundFlower 2ch output, everything works as expected. Somewhere in the chain there must be a 48k->44k1 conversion but it doesn't seem to affect REW as the impulse response looks good in this case. I will experiment more with it over the next few days to see if it's stable, and report back. This is all on the 10.8.2 machine that I'm now running it with JDK8 EA. I'll switch back to the Apple Java if it would help.

I assume that REW won't by default pick up the sensitivity reading in the UMIK cal file in this case.

I was also able to use this configuration to run a measurement using a multi-input soundcard (MOTU Microbook II), which I wasn't able to do before. Perhaps this would even work for Firewire soundcards? I have one on the shelf, I will try it and let you know.


----------

