Auto clock switching for Focusrite(Scarlett, maybe others) when S/PDIF clock unavailable.

This little tool is exactly what I've been missing so bad! However, I ran into issues with the tool. Both the pre-compiled darwin version as well as the one I was able to compile (of which I'm proud of as a total noob) on my Intel MBP say the same error:

"no such host"

I tried with the firewall turned off, but still got the same error. I'm a total noob with programming, and quite incompetent in Terminal. Any tips what should I do to get the tool to reach to my Scarlett 6i6 2nd gen? Thanks!
 
This little tool is exactly what I've been missing so bad! However, I ran into issues with the tool. Both the pre-compiled darwin version as well as the one I was able to compile (of which I'm proud of as a total noob) on my Intel MBP say the same error:

"no such host"

I tried with the firewall turned off, but still got the same error. I'm a total noob with programming, and quite incompetent in Terminal. Any tips what should I do to get the tool to reach to my Scarlett 6i6 2nd gen? Thanks!
It connects to the hostname that focusrite control returns, which is your computer name.
But if that is set to something that doesn't resolve, you'll have this problem.
My work mac is set to a hostname that doesn't resolve, so it's not uncommon.

I just pushed a new release 1.11.2 with an option to ignore the hostname that FR control returns and just uses localhost.

Just run it with the -i option to force it to use localhost.
https://github.com/dounix/focusrite-autoclock/releases/tag/v1.11.2
 
Last edited:
This is awesome!! How'd you work out the protocol?

the focusrite control app that runs in the tray talks to the focusrite control service, just sniffed the network between those two.
They use UDP on a known port, to then discover the TCP service on a dynamic port, after that it's an (nearly) xml stream.
The UDP lets anyone discover, but when you connect to the tcp service to get/change data, thats when you would have to auth the request in the FC control app.
There are some xmls for each model in the focusrite install directories that describe what controls each model has.

Make no mistake, that code is awful, but it worked around a problem for me.
I run my focusrite as the master now, since the fx3 can use an external clock(didn't know that for a year or so), eliminating the need for me.
When I used my kemper it was old enough that it doesn't have external clock support.
 
Thanks for the reply @jamess
Really cool to know stuff like that is possible, great motivation to improve my xml and protocol skills 👍

I get the occasional loud popping sound from my AxeFX when I use my Focusrite as the master. It happens only once every 10mins or so. I think this will solve my issue of forgetting to switch the interface to spdif.
 
I just pushed a new release 1.11.2 with an option to ignore the hostname that FR control returns and just uses localhost.
Wow, thank you! I did get further but it's not working just yet. I approved the connection in Focusrite Control, and the Autoclock in Terminal does or tries to do something. But it doesn't change the clock, it just loops with this when used with "-i -d" flags:

Screenshot 2024-04-29 at 5.23.52.png

And if I set the clock to S/PDIF manually, it loops this, whether the S/PDIF device is powered on and playing or it's powered off:

Screenshot 2024-04-29 at 5.34.48.png

Also, does the add-on run in the background if I close Terminal? Or if I reboot the computer?
 
Wow, thank you! I did get further but it's not working just yet. I approved the connection in Focusrite Control, and the Autoclock in Terminal does or tries to do something. But it doesn't change the clock, it just loops with this when used with "-i -d" flags:

View attachment 139566

And if I set the clock to S/PDIF manually, it loops this, whether the S/PDIF device is powered on and playing or it's powered off:

View attachment 139567

Also, does the add-on run in the background if I close Terminal? Or if I reboot the computer?
Looked in the thread but I didn't see it, what model is your interface?
Looks like it's trying to set it to spdif clock, which means it's seeing some amount of input level on the spdif in.


No it doesn't background itself or start on boot. I was playing around with a version that would run in the tray on multiple platoforms but ran into some non-default things that have to be installed on macOS.
 
Back
Top Bottom