1 (edited by Richie Asimilon 2026-05-10 13:25:58)

Topic: Command line utility to set the sample rate of Digiface USB

I've had a rather annoying problem of late whereby my Digiface USB (connected to Audient EVO SP8) would always default to 192kHz.

Nothing I tried would force it to remember a sample rate that was:

a) useable
b) one that I wanted to use.

So I had Anitgravity write me a command line utility to set the sample rate so that I can run that once my Mac has started!

I'm sharing it in case this might be useful for someone else having similar issues.

Download here: https://drive.google.com/file/d/12-smE- … sp=sharing

It's a Univeral Binary so should run on Intel/Apple Silicon (I've only tested on my Intel Mac Pro).

It's signed and notarised, but it's not possible to staple a raw binary, so you will probably have to jump through some hoops to remove quarantine bit after downloading (ask your favourite LLM is you don't know how).

It's provided AS IS, and I offer no warranty and absolve myself of all liability if you choose to run it.  YOU USE IT AT YOUR OWN RISK.

That said it works perfectly for me and I promise it doesn't install a crypto-miner on your machine! wink

I cannot offer support, and I will not update it, since it does the job for me.  You can prompt Antigravity yourself if you don't trust this or need different features.

Usage:

$ ./set_rme_sample_rate
Usage: set_rme_sample_rate <DeviceName> <SampleRate>
Example: set_rme_sample_rate "Digiface USB" 44100

It may well work for other RME devices, but I cannot test that myself, and as mentioned you run this at your own risk.  If your computer or RME dies as a result of running it, that's not my problem (but honestly I think that isn't a major thing to worry about happening).

To have it run when your Mac boots, ask your favourite LLM for instructions if you don't already know how.

Enjoy.

2 (edited by Richie Asimilon 2026-05-10 13:43:06)

Re: Command line utility to set the sample rate of Digiface USB

I've uploaded the code to GitHub, so you can inspect it and build from source if you don't trust some random person on the internet, which to be honest you shouldn't do!

https://github.com/Bom-Shanka-Machines/ … ample-Rate

Re: Command line utility to set the sample rate of Digiface USB

Interesting... If I looked into your sources right, your Swift tool does the same as AMS. Correct?

So, as Audio MIDI Setup uses the same CoreAudio API under the hood (AudioObjectSetPropertyData with kAudioDevicePropertyNominalSampleRate), setting the rate there should be equivalent.
And you probably start your binary via a daemon (sth like launchctl which is triggered by a plist in LaunchAgents dir on startup/login)?

So, either because the SP8 is acting as clock master and advertising 192kHz, or because CoreAudio resets to a device default on reconnect might be the root cause for your problem...

However, interesting approach, thanks for sharing your (or your AI's) idea.

“Do It For Her”
My Gear: Bontempi Magic light Keyboard

Re: Command line utility to set the sample rate of Digiface USB

Also, Digiface USB remembers its state (at least under Win) even if computer is off, under the condition, Digiface USB is still on power.

I use powered USB hub for that purpose. And Digiface USB holds its settings (routing for sure and clock probably as well as I do not have to set it again and again...). I use Digiface USB even in sort of standalone mode (with computer off), because, while it has been powered on it remembers its settings, no need for computer.

But it might work a bit differently under Mac... One would have to try.

FF UCX II, Digiface USB, Babyface Pro FS

Re: Command line utility to set the sample rate of Digiface USB

@Kubrak
Sure, DF USB doesn't store its settings on power loss or usb disconnect. But its routing settings are not the point here.
Btw, MC mentioned it here: https://forum.rme-audio.de/viewtopic.ph … 15#p249515
Don't know how win handles the "last sample rate" state for audio devices, but its not the point here, too (as TO uses Mac).
However, maybe its an option, if you want keep the unit 24/7 on (USB) power (at least I wouldn't)..

---
So, Macs (or AMS, or macOS System) stores sample rate (and lots of other) settings always and in general in these files:
- /Library/Preferences/Audio/com.apple.audio.DeviceSettings.plist
- /Library/Preferences/Audio/com.apple.audio.SystemSettings.plist
And this per device UID (differs in CC/USB Mode)

Even the RME USB Settings App reads it "from AMS" (and if changed, it sets it in AMS)

So on a USB connect/startup/System reboot (even if DF was unpowered in meantime), AMS recognizes the device by its previously known UID from its plist - and sets the sample rate actively by itself...
Sure, I dont have a DF here, but my 802 and UFX3 exactly behave like this (regardless if in CC or USB mode).
So, again: either because the SP8 is setting the SR somehow, or because CoreAudio (AMS) could not save/read the state into/from the files i mentioned above.

“Do It For Her”
My Gear: Bontempi Magic light Keyboard

Re: Command line utility to set the sample rate of Digiface USB

Interesting... If I looked into your sources right, your Swift tool does the same as AMS. Correct?

I can't really comment, since I didn't actually write the code! lol

So, as Audio MIDI Setup uses the same CoreAudio API under the hood (AudioObjectSetPropertyData with kAudioDevicePropertyNominalSampleRate), setting the rate there should be equivalent.
And you probably start your binary via a daemon (sth like launchctl which is triggered by a plist in LaunchAgents dir on startup/login)?

Yep, .plist in ~/Library/LaunchAgents/

So, either because the SP8 is acting as clock master and advertising 192kHz, or because CoreAudio resets to a device default on reconnect might be the root cause for your problem...

I have the SP8 syncing to DF and it's set to be the clock master (since I think RME clock is probably higher quality than SP8) and I don't think the SP8 even supports 192kHz anyway, so really baffled where it's pulling this 192kHz from.  When I first had this all set up it was working fine and remembering the settings I had chosen, then I installed a macOS update and it started being broken. sad

However, interesting approach, thanks for sharing your (or your AI's) idea.

I can at least claim responsbility for the idea, just not the code! big_smile