mirror of
https://github.com/gdsports/USBHost_t36
synced 2024-11-21 16:45:04 -05:00
Fix MIDI getType return values for note on message
This commit is contained in:
parent
aa037a65e5
commit
d169a1a387
4
midi.cpp
4
midi.cpp
@ -392,12 +392,12 @@ bool MIDIDevice::read(uint8_t channel)
|
|||||||
} else
|
} else
|
||||||
if (type1 == 0x09 && type2 == 0x09) {
|
if (type1 == 0x09 && type2 == 0x09) {
|
||||||
if ((n >> 24) > 0) {
|
if ((n >> 24) > 0) {
|
||||||
msg_type = 0x9; // 0x9 = Note on
|
msg_type = 0x90; // 0x90 = Note on
|
||||||
if (handleNoteOn) {
|
if (handleNoteOn) {
|
||||||
(*handleNoteOn)(ch, (n >> 16), (n >> 24));
|
(*handleNoteOn)(ch, (n >> 16), (n >> 24));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
msg_type = 0x8; // 0x8 = Note off
|
msg_type = 0x80; // 0x80 = Note off
|
||||||
if (handleNoteOff) {
|
if (handleNoteOff) {
|
||||||
(*handleNoteOff)(ch, (n >> 16), (n >> 24));
|
(*handleNoteOff)(ch, (n >> 16), (n >> 24));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user