lathoub / Arduino-BLE-MIDI

MIDI over Bluetooth Low Energy (BLE-MIDI) 1.0 for Arduino
MIT License
219 stars 33 forks source link

Added runningStatus continuation in receive() #32

Closed RobertoHE closed 3 years ago

RobertoHE commented 3 years ago

Added runningStatus continuation after a timeStamp Low or a System message (0xF#)

I only have modificated the MSVS code, check it before you copy it to to BLEtransport.h

RobertoHE commented 3 years ago

Hi @lathoub I used the same "style" like you for adding runningStatus messages. I have added midiStatus header before all runningStatus after a timeStamp. 2 bytes messages (for example afterTouch) followed by other runningStatus (other byte) are interpreted by receive() parser like 3 byte messages. Fortunately, midi.parser() accept runningStatus messages.

It means that it is not necessary add always the midiStatus header before a midiRunning.

I only comment this for a future update. It may save any processing time because receive() adds less bytes to buffer.

https://github.com/FortySevenEffects/arduino_midi_library/blob/0d605dc8a7e423fd2c74ccc0287adc164d46de7d/src/MIDI.hpp#L781-L1076