Merge pull request #11961 from humbletim/add-midi-control-change

forward MIDI_CONTROL_CHANGE events
This commit is contained in:
Melissa Brown 2017-12-20 17:11:08 -08:00 committed by GitHub
commit fddb192af8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -177,9 +177,10 @@ void Midi::MidiCleanup() {
#endif
void Midi::noteReceived(int status, int note, int velocity) {
if (((status & MIDI_STATUS_MASK) != MIDI_NOTE_OFF) &&
((status & MIDI_STATUS_MASK) != MIDI_NOTE_ON)) {
return; // NOTE: only sending note-on and note-off to Javascript
if (((status & MIDI_STATUS_MASK) != MIDI_NOTE_OFF) &&
((status & MIDI_STATUS_MASK) != MIDI_NOTE_ON) &&
((status & MIDI_STATUS_MASK) != MIDI_CONTROL_CHANGE)) {
return; // NOTE: only sending note-on, note-off, and control-change to Javascript
}
QVariantMap eventData;