[Solved] Trying to send midiclock but ERROR: Failed to find MIDIOut port a MIDIOut a LinkClock

Hi everybody,

I'm trying to send midiclock to my synths and external sequencer. Connecting the new LinkClock doesn't seem to work on my system. I'm on Kubuntu.

I installed the crucial-library in SuperCollider and tried the steps listed in the documentation: initialized midi interface and created a new LinkClock. The last command fails:

~mc = MIDIClockOut(~midiOut, ~lc);

Output:

ERROR: Failed to find MIDIOut port a MIDIOut a LinkClock

When I evaluate ~midiOut SuperCollider responds with "-> a MIDIOut" and evaluating ~lc says "-> a LinkClock".

Does anybody have any ideas how to get this to work?

I got it working by looking at the documentation (MIDIClockOut | SuperCollider 3.12.2 Help) and changing the command:

~m = MIDIClockOut.new("USB Uno MIDI Interface", "USB Uno MIDI Interface", ~lc);

where "USB Uno MIDI Interface" is the name of my midi interface as reported by MIDIClient.init;

Sorry for this @nicasi. I had forgotten about some local modifications I had made to MIDIClockOut to make it share the MIDI instance I was already using.

Thanks for updating the documentation!

I found that MIDIClockOut is not great for our use-case since it doesn't synchronize the start with the Link quantum. This means it will send the MIDI start immediately instead of at a cycle boundary. New MIDI clock instructions by Zalastax · Pull Request #124 · tidalcycles/tidal-doc (github.com) fixes that.

1 Like

Glad I could contribute a tiny bit to this amazing piece of human effort which is Tidal Cycles :heart:

1 Like

@Zalastax I tried using the new SuperCollider class you created in that documentation PR, but the MIDI clock tempo still will not change for me when modifying the tempo from Tidal. Not sure if I've got something configured incorrectly.

Thanks for notifying me about this @sfradkin! There was a bug in the class code. I have uploaded a fix to this in the Pull Request. The change can be seen in this commit. I hope it works for you now! If not, please check that Tidal and SuperCollider are connected by running ~lc.numPeers; which should be 1.

Hmm... ~lc.numPeers only gives me 0. Do I need to install a specific branch of SuperCollider for this to work?

That's a bummer @sfradkin!

No, I use Supercollider 3.12.2 and Tidal 1.9.2. On my machine, I start SuperDirt, Tidal, and LinkClock in any order and it just works. I recommend trying different orders to see if it might matter. I think it used to matter for me, but I can't reproduce it any longer. I'll keep an eye on this thread and Discord to try to help debug this.