Hi Jules,
On macos, if I send this midi message :
0x90, 60, 0xF8, 48
(that is , note-on for note 60, velocity 48, with a midi clock message that happened inside the note-on)
The same bytes are received in the MidiPortCallback::handlePackets, in a single packet, which is sent into MidiDataConcatenator , which fails to deal with the midi clock message, and builds this single MidiMessage : 0x90 60 0xF8 ( instead of 0xF8, followed by 0x90 60 48)
This does not happen on windows, probably because somewhere inside the OS the midi packets are parsed and tokenized, while on macos you seem to get what you sent.
In fact it seems also that midi running status does not work, and MidiDataConcatenator should handle it:
if I send 0x90, 60, 48, 61, 49, 62, 50 (that is note-on 60 with vel 48, note-on 61 vel 49 and note-on 62 vel 50), on Windows the midi input callback ends up with
0x90 60 48
0x90 61 49
0x90 61 50
while on Macos, I only get 0x90 60 48 and then the MidiDataConcatenator throws up the rest of the packet
I must add that this is a not a purely theorical issue, since I have some users seem to run into this (when their midi keyboard sends midi clock messages over a good old midi cable)
So, to summarize:
- MidiDataConcatenator should handle all realtime messages: http://www.blitter.com/~russtopia/MIDI/~jglatt/tech/midispec/real.htm
- it should also deal with running status: http://www.blitter.com/~russtopia/MIDI/~jglatt/tech/midispec/run.htm