diff options
author | Ovnuniarchos <pujalte.jorge@gmail.com> | 2020-01-21 21:46:25 +0100 |
---|---|---|
committer | Ovnuniarchos <pujalte.jorge@gmail.com> | 2020-01-22 21:41:48 +0100 |
commit | 9c48eb1c599d87d220dd3291487792f555eb9871 (patch) | |
tree | 9c3c24b7a256c244e8d780b6faea844d4b7423dc /drivers | |
parent | 90a224c6eb202c1e6d87bded6adf50d7e40f08fc (diff) |
ALSA MIDI driver:
Pith bend message now has correct size (was 2 bytes instead of 3).
Recognized (but not implemented) 0xF? messages. SysEx messages will be reocognized as such, but their contents will be ignored.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/alsamidi/midi_driver_alsamidi.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/alsamidi/midi_driver_alsamidi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp index 10581a460c..68a34fe485 100644 --- a/drivers/alsamidi/midi_driver_alsamidi.cpp +++ b/drivers/alsamidi/midi_driver_alsamidi.cpp @@ -43,12 +43,30 @@ static int get_message_size(uint8_t message) { case 0x90: // note on case 0xA0: // aftertouch case 0xB0: // continuous controller + case 0xE0: // pitch bend + case 0xF2: // song position pointer return 3; case 0xC0: // patch change case 0xD0: // channel pressure - case 0xE0: // pitch bend + case 0xF1: // time code quarter frame + case 0xF3: // song select return 2; + + case 0xF0: // SysEx start + case 0xF4: // reserved + case 0xF5: // reserved + case 0xF6: // tune request + case 0xF7: // SysEx end + case 0xF8: // timing clock + case 0xF9: // reserved + case 0xFA: // start + case 0xFB: // continue + case 0xFC: // stop + case 0xFD: // reserved + case 0xFE: // active sensing + case 0xFF: // reset + return 1; } return 256; @@ -83,6 +101,9 @@ void MIDIDriverALSAMidi::thread_func(void *p_udata) { bytes = 0; } expected_size = get_message_size(byte); + // After a SysEx start, all bytes are data until a SysEx end, so + // we're going to end the command at the SES, and let the common + // driver ignore the following data bytes. } if (bytes < 256) { |