Bug #1066: Add helper function to send SysEx/MTC via usb-device-midi
I was using USB-device-midi to send MTC to the host, which is essentially SysEx. But was slowed by the missing helper function to send the packet of SysEx. Anyhow, I wrote one...
Full example script here: https://github.com/orgs/micropython/discussions/18450#discussioncomment-15043069
Thanks for the contribution.
But I'm a bit confused, I thought system exclusive messages were a completely different format, namely:
- they start with 0xF0
- they have an number of data bytes with the most-sig-bit clear
- they end with 0xF7
How does that differ to the sys ex added here?
You are correct, SysEx generally starts with 0xF0 and ends with 0xF7.
The helper function takes an array of bytes (say "0xf07f7f010160000000f7") and fragments it to pass over USB-midi protocol, then the USB host reassembles it to pass to client application.
The example script (for Pico) generates both the long and short messages that MTC uses.