diff --git a/src/midi.cpp b/src/midi.cpp index 4b773bb..93d83d6 100644 --- a/src/midi.cpp +++ b/src/midi.cpp @@ -83,7 +83,15 @@ midiProcess(const snd_seq_event_t* ev) nev.note = ev->data.note.note; nev.channel = ev->data.note.channel; - nev.note_on = (ev->type == SND_SEQ_EVENT_NOTEON) ? true : false; + nev.note_on = false; + + // NOTE: NOTE_ON with velocity of 0 is also a common way to store NOTE_OFF in + // MIDI files + if ( ev->type == SND_SEQ_EVENT_NOTEON && + ev->data.note.velocity > 0) + { + nev.note_on = true; + } } else if(ev->type == SND_SEQ_EVENT_CONTROLLER) {