when instanciating multiple instances of SerialMIDI, a redefinition error accors because of typing of the serial##Name.
Fix: removed the typdef, a bit harder to read, but avoided complex #ifdef
1) Active Sensing:
Once an ActiveSensing message is received, the system checks for timeouts: if no message is received within the specified 300ms (see in _Defs), an error is set and the checks for timeout stop.
2) added a callback for errors. 2 errors are defined: parse error and ActiveSensing timeout
Splitting larger incoming messages into smaller SysEx packets - using an RrtpMidi trick:
// first: 0xF0 .... 0xF0
// midlle: 0xF7 .... 0xF0
// last: 0xF7 .... 0xF7
see: https://tools.ietf.org/html/rfc4695#section-3.2
(Understanding this is not part of the original MIDI spec, but does allow for receiving very very large SysEx messages on a small footprint (does require some 'handy' parsing))
SysExMaxSize in Settings can be reduced significatly (16bytes works fine - pending use case)
- send: pass the message as a const ref, to avoid copies
- add mSerial.begin (with Baudrate - added Settings)
- ThruActivated defaults to true
- class name serialMIDI => SerialMIDI
added send(MidiMessage) for Bridge application (that convert MIDI transport x into MIDI transport y), avoiding parsing entry a stream, setting up all callback - whilst this allows for passing the content, without to much processing/parsing.
Had to move mPendingMessageExpectedLenght into MidiMessage to avoid parsing the data again, just to know the size
Added Bridge example (untested)
Gives more control over the bool value. Typical value is 300 (ms) - an Active Sensing command is send every 300ms; or 0 (zero) to disable sending ActiveSensing