I'm observing BLE MIDI packets with unexpected timestamps. I'm running Presonus Studio One 5 Pro to send MIDI events from MacOS Monterey. MIDI is sent to a BLE MIDI device peripheral connected to the Mac central.
Below 2 examples of received packets :
Packet N (3 bytes)
0xAE 0xDD 0xF8 // Midi clock with time stamp 5981d
Packet N+1 (3 bytes)
0xAE 0xF1 0xF8 // Midi clock with time stamp 6001d
Packet N+2 (5 bytes)
0x80 0x80 0xFC // Midi stop with time stamp 0
0x85 0xF8 // Midi clock with time stamp LSB referring to previous packet (N+1)
20ms between Packets N and N+1 is as expected.
For packet N+2 : Time stamp LSB 0x85 makes 20ms if previous packet Time stamp MSB is used (0xAE). But the specification does not mention to use MSB timestamp of previous packet.
Packet N (4 bytes)
0xA0 0xC8 0xF1 0x30 // MTC with time stamp 4168d
Packet N+1 (4 bytes)
0xA0 0xD2 0xF1 0x40 // MTC with time stamp 4178d
Packet N+2 (4 bytes)
0xA0 0xDC 0xF1 0x50 // MTC with time stamp 4188d
Packet N+3 (16 bytes)
0x80 0x80 0xF0 0x7F 0x7F 0x01 0x01 0x20 0x00 0x00 0x00 0x80 0xF7 // MTC Sysex with time stamp 0d
0xE6 0xF1 0x60 // MTC with time stamp LSB only
We can observe a time difference of 10ms on the first 3 packets, this is the expected timing.
On packet N+3, there is a SYSEX with timestamp 0 (Timestamp MSB and LSB are zero), plus a MTC with time stamp LSB only, I assume the time stamp MSB is the one found in the current packet N+3 (MSB = 0), but it seems the timestamp MSB should be the one from the previous packet (N+2).
Is there something I did not understand in BLE MIDI Timestamps ?
Thanks for any help.