diff --git a/src/lib.rs b/src/lib.rs index 16076bd..8dac50d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,7 +31,7 @@ impl MidiMessage { #[must_use] pub fn is_note_off(&self) -> bool { - (self.msg[0] & 0b1111_0000) == NOTE_OFF_STATUS + (self.msg[0] & 0b1111_0000) == NOTE_OFF_STATUS || (self.is_note_on() && self.msg[2] == 0) } /// Get the channel of a message, assuming the message is not a system message.