summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorOvnuniarchos <pujalte.jorge@gmail.com>2020-01-21 21:46:25 +0100
committerOvnuniarchos <pujalte.jorge@gmail.com>2020-01-22 21:41:48 +0100
commit9c48eb1c599d87d220dd3291487792f555eb9871 (patch)
tree9c3c24b7a256c244e8d780b6faea844d4b7423dc /core
parent90a224c6eb202c1e6d87bded6adf50d7e40f08fc (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 'core')
-rw-r--r--core/os/midi_driver.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/os/midi_driver.cpp b/core/os/midi_driver.cpp
index 614ce99b2e..3e020a1585 100644
--- a/core/os/midi_driver.cpp
+++ b/core/os/midi_driver.cpp
@@ -52,7 +52,12 @@ void MIDIDriver::receive_input_packet(uint64_t timestamp, uint8_t *data, uint32_
uint32_t param_position = 1;
if (length >= 1) {
- if ((data[0] & 0x80) == 0x00) {
+ if (data[0] >= 0xF0) {
+ // channel does not apply to system common messages
+ event->set_channel(0);
+ event->set_message(data[0]);
+ last_received_message = data[0];
+ } else if ((data[0] & 0x80) == 0x00) {
// running status
event->set_channel(last_received_message & 0xF);
event->set_message(last_received_message >> 4);