True, I did not think of these aspects
The code is not keeping track of the individual message lengths as of yet.
I seems quite tricky to ensure no other midi is transmitted when sending sysex in split chunks, I have no idea for that.
Still, a ringbuffer seems handy for storing and keeping track of the chunks.
Theoretically speaking, if it would be possible to grab data from
MidiGetOutputBufferPending end erase the pending buffer somehow to resend it later, that would help.
Actually, the buffer appears to be exposed in the
_MIDI_Process struct (looking at the USB one)
Still, one does not know where in the order of objects the own call happens, probably in the middle, so no certainty gained.