[sdiy] MIDI Clock sync advice

brianw brianw at audiobanshee.com
Sat Mar 9 06:33:57 CET 2024


On Mar 8, 2024, at 6:51 PM, Benjamin Tremblay wrote:
> If I use USB midi it all works perfectly. 
> But that’s cheating. 

Ha, ha.

I guess it depends upon whether you're talking about the USB Host side, or the USB Device side. Technically, the USB Host is in control of scheduling USB-MIDI messages in USB frames, and if the Host decides other USB messages have priority then it could easily delay a MIDI Timing Clock by 1 ms or even a multiple or more of that. USB-MIDI has no time-stamping of messages, and no guaranteed delivery scheduling, so timing is potentially high in jitter.

If you're talking about the USB Device, you're still at the mercy of the firmware implementation of USB-MIDI. When I last worked on a USB-MIDI device, chip vendors did not provide this - you had to roll your own.

Regardless of whether MIDI comes in over a classic interface or USB-MIDI interface, your sequencer tempo is only ever going to be as good as your hardware timing reference, which is hopefully low-jitter. Then, the firmware has to translate from the timing of the incoming MIDI data and interpret that in a way that can drive the PLL.

Brian

p.s. I realize that you were probably just joking around, but if there's a given USB-capable processor that has a USB-MIDI Device firmware implementation that handles MIDI Timing Clock perfectly, then I would be very interested to know about it. My experience is probably out of date now, and I know that USB firmware implementations have been getting better and better over the decades (for a while, USB Audio was basically impossible without spending $10,000 to license custom firmware, but then USB chip vendors eventually got around to giving out example firmware with their SDK, and that suddenly became easier. If USB-MIDI now has that kind of support, I'd love to learn more)




More information about the Synth-diy mailing list