MidiMessageSplitter constructor

MidiMessageSplitter({
  1. required void onMessage(
    1. Uint8List message,
    2. int timestamp
    ),
  2. int maxSysExLength = 65536,
})

Creates a splitter delivering complete messages to onMessage.

onMessage receives the message bytes and the timestamp that was passed to the parse call carrying the byte which completed it.

maxSysExLength bounds an unterminated SysEx, counting the opening 0xF0 and the synthesised 0xF7. Values below 2 are treated as 2.

Implementation

MidiMessageSplitter({required this.onMessage, this.maxSysExLength = 65536});