Measurement issue with Mac

Leo11

Registered
Thread Starter
Joined
Jul 23, 2022
Messages
32
More  
Main Amp
Hypex NC252MP
Additional Amp
Hypex NC502MP
Computer Audio
Dell notebook
DAC
Motu Ultralite Mk5
Front Speakers
NHT C3
Subwoofers
2x 12" DIY Scan Speak acoustic suspension
Streaming Subscriptions
Amazon Music Unlimited
Hello everyone.
I have been using REW (latest official) on Mac (Sonoma) for a few months and after several experiments I have come to the conclusion that there may be a little bug in the measuring process.
In summary, if an acoustic reference is not used, the capture ends before the entire sweep is emitted. Sometimes it is even cut at 5kHz.
I tried all possible settings (buffer, dither, play silence, delay, etc.) but there is no way to make it work.
The only way is to use an acoustic reference so it proceeds until it detects it after the sweep.
As equipment I have an Ultralite MK5, with in and out on the same unit.
I make some measurements using the Dirac processor as an out unit and the Ultralite as in, but same behaviour.
It seems strange to me that mine is an isolated case. Also if I use Windows everything works fine.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,562
Sounds like a problem with long replay latency on the mac. The acoustic timing reference removes the latency by waiting for the timing reference to start capture.
 

Leo11

Registered
Thread Starter
Joined
Jul 23, 2022
Messages
32
More  
Main Amp
Hypex NC252MP
Additional Amp
Hypex NC502MP
Computer Audio
Dell notebook
DAC
Motu Ultralite Mk5
Front Speakers
NHT C3
Subwoofers
2x 12" DIY Scan Speak acoustic suspension
Streaming Subscriptions
Amazon Music Unlimited
Sounds like a problem with long replay latency on the mac. The acoustic timing reference removes the latency by waiting for the timing reference to start capture.
Can I provide you with some additional information / files / logs to find a solution to the problem?
This is a rather limiting problem where it is not possible or necessary to use the acoustic reference (subs, digital loopback, band limited measurements, etc).
 

Leo11

Registered
Thread Starter
Joined
Jul 23, 2022
Messages
32
More  
Main Amp
Hypex NC252MP
Additional Amp
Hypex NC502MP
Computer Audio
Dell notebook
DAC
Motu Ultralite Mk5
Front Speakers
NHT C3
Subwoofers
2x 12" DIY Scan Speak acoustic suspension
Streaming Subscriptions
Amazon Music Unlimited
Here the screenshot.
There is also mic cal file loaded.

Screenshot 2024-05-08 alle 14.55.49.png


And here the captured sweep (10Hz to 22kHz, 256k lenght) without timing ref setted and using Ultralite5 digital loopback channel.

capture.jpg


And here the same but with "capture noise floor" and "play dither before sweep" options activated.

capture2.jpg


The same happens if I use Blackhole loopback audio device.
 
Last edited:

Leo11

Registered
Thread Starter
Joined
Jul 23, 2022
Messages
32
More  
Main Amp
Hypex NC252MP
Additional Amp
Hypex NC502MP
Computer Audio
Dell notebook
DAC
Motu Ultralite Mk5
Front Speakers
NHT C3
Subwoofers
2x 12" DIY Scan Speak acoustic suspension
Streaming Subscriptions
Amazon Music Unlimited
I reduced the buffer to 16k and it seems to work.
 

Leo11

Registered
Thread Starter
Joined
Jul 23, 2022
Messages
32
More  
Main Amp
Hypex NC252MP
Additional Amp
Hypex NC502MP
Computer Audio
Dell notebook
DAC
Motu Ultralite Mk5
Front Speakers
NHT C3
Subwoofers
2x 12" DIY Scan Speak acoustic suspension
Streaming Subscriptions
Amazon Music Unlimited
@John Mulcahy
I'm not sure I have solved it.
I'm damning myself to understand what problem there is.
I explain:
I am now using my Motu Ultralite MK5 to make digital loopback measurements (Mk5 has 2 channels to digital loopback output channels, bitperfectly).
I'm sure everything is set up correctly, there are no resamplings or digital controls in place.
If I play 1khz sine tone and capture the loopback signal I expect to find the same spectrum as the output signal.
On Windows (with ASIO driver and 256 samples buffer) this is what happens in fact, as shown in the attached image (low noise floor, no spurious tones, stable spectrum, and moreover ZERO clock drift as expected since the IN/OUT are based on the same clock source of Ultralite mk5).
On Mac, on the other hand, I find the behaviour shown in the attached video: unstable spectrum and clock drift not equal to zero.
However, this behavior is variable. It seems that with each opening of the interface the instability of the spectrum changes. Sometimes it is extremely variable, sometimes it is slower.l, but always unstable.
I have noticed that this behavior also depends on the IN/OUT buffer value set in REW.
This also happens if I use BlackHole as a loopback interface, but only at low buffer values. With 256K buffer on Blackhole the captured spectrum is as perfect as the one on Windows.

There is something that does not work properly in the Mac system, but I can't determine where.

Also considering the previously indicated problem of incorrect capture of the measurement, is it possible that this depends on how REW uses the audio interface on Mac?

I in fact do not encounter problems using the interface with other programs... no dropouts, glitches or audible artefacts.
 

Attachments

  • win.png
    win.png
    141.4 KB · Views: 7
  • Loopback_256.mov
    13.8 MB

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,562
Make sure the sample rate in Audio Midi Setup for the interface is the same as the sample rate in REW. The behaviour looks like dropouts in the data. On macOS REW accesses audio through the Java runtime, which uses CoreAudio.

An ASIO buffer of 256 samples on Windows is risky, Java processes can be pushed into the background long enough to miss a block.
 

Leo11

Registered
Thread Starter
Joined
Jul 23, 2022
Messages
32
More  
Main Amp
Hypex NC252MP
Additional Amp
Hypex NC502MP
Computer Audio
Dell notebook
DAC
Motu Ultralite Mk5
Front Speakers
NHT C3
Subwoofers
2x 12" DIY Scan Speak acoustic suspension
Streaming Subscriptions
Amazon Music Unlimited
Make sure the sample rate in Audio Midi Setup for the interface is the same as the sample rate in REW. The behaviour looks like dropouts in the data. On macOS REW accesses audio through the Java runtime, which uses CoreAudio.

An ASIO buffer of 256 samples on Windows is risky, Java processes can be pushed into the background long enough to miss a block.
Every sample rate setting is matched at 44.1khz (REW, Mac Audio Midi, Motu Ultralite) and the Ultralite is set to internal clock.

On Windows with ASIO driver I have no problem. Motu's driver is rock solid even at lower buffer values (but they also include safety buffers which value is not selectable).
Inexplicably on Mac there is this behavior. I just can't understand the cause. I also tried to change USB port but nothing.

However I did further tests:

1) I used REW's signal generator to reproduce the tone and Audacity to record the Ultralite's digital loopback channel, then analyzed the spectrum of recorded file with REW RTA.
No resulting anomalies (the harmonics and noise floor rising at higher freq are due to Audacity audio engine):
audacity_from_REW.jpg


2) I played a tone with VLC player and captured Ultralite's digital loopback channel with REW RTA.
No resulting anomalies (harmonics and spurious tones are due to VLC audio engine):
loopback_from_vlc.jpg


3) I played a tone on the Ultralite's optical input (Ultralite clock set to optical source) and captured the input with REW RTA.
No resulting anomalies (the spectrum perfectly matches the source file).
optical_in.jpg


If dropouts occur in CoreAudio they should be recorded / highlighted in this tests, but nothing.
The aforementioned anomaly occurs only when I use the REW as signal generator and its RTA to capture the digital loopback.
Individually, REW's rendering and capture channels do not appear to introduce any problems. It just seems like a sync issue arises when used together.

Also, I encounter strange behaviour if I perform a sweep measurement with digital loopback and very low signal level.
This is the capture playing test sweep at -120dBFS 44,1kHz/24bit. That increasing noise/distortion at high frequency shouldn't be there... or it's normal? TD+N should be at -140dB or so...
level.jpg
 
Last edited:

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,562
Yes, it's normal to see noise when using signal levels of -120 dBFS.

Some interfaces on the mac can have problems if replay is started before capture, perhaps that's the case for the Motu Ultralite.
 

Leo11

Registered
Thread Starter
Joined
Jul 23, 2022
Messages
32
More  
Main Amp
Hypex NC252MP
Additional Amp
Hypex NC502MP
Computer Audio
Dell notebook
DAC
Motu Ultralite Mk5
Front Speakers
NHT C3
Subwoofers
2x 12" DIY Scan Speak acoustic suspension
Streaming Subscriptions
Amazon Music Unlimited
Some interfaces on the mac can have problems if replay is started before capture, perhaps that's the case for the Motu Ultralite.

This could explain the issue of measurement with sweep explained above.

But in the case of the unstable spectrum it happens both if I start the generator first with respect to RTA and vice versa...
 

Leo11

Registered
Thread Starter
Joined
Jul 23, 2022
Messages
32
More  
Main Amp
Hypex NC252MP
Additional Amp
Hypex NC502MP
Computer Audio
Dell notebook
DAC
Motu Ultralite Mk5
Front Speakers
NHT C3
Subwoofers
2x 12" DIY Scan Speak acoustic suspension
Streaming Subscriptions
Amazon Music Unlimited
It seems to me that from the tests I have carried out I have excluded all potential hardware and setup related causes (correct me if I'm wrong).
What remains should be between Core Audio and REW.
I am contacting Motu's technical support to also get their feedback.
I suspect that this is a rare issue, very related to this setup, so it's difficult to replicate it.

Is there any other software on Mac that allows to make the same loopback measurement?
I cannot find any...
 
Top Bottom