Note_Off is displayed as Note_On #605
-
|
Hi, Below is a midi file printed using mido. In this file, the key c4 is pressed and released 10 times.
MidiFile(type=1, ticks_per_beat=24, tracks=[ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
According to the MIDI 1.0 specification, page 73, a MIDI note-on event ( The advantage of this is that, assuming an uninterrupted stream of note-on and note-off events, a space-conscious implementation may take advantage of the running status. Your file likely employed such encoding methods. I haven't looked at the mido codebase, so my answer is mostly related to MIDI as a whole, not this project in particular, which appears to be completely in-spec. Edit: related discussions: |
Beta Was this translation helpful? Give feedback.
According to the MIDI 1.0 specification, page 73, a MIDI note-on event (
9n) with a velocity of 0 is considered a note-off. In your example, everynote_onevent is immediately followed with anothernote_onbut with avelocity=0, thereby functioning as thenote_off(s) you look for.The advantage of this is that, assuming an uninterrupted stream of note-on and note-off events, a space-conscious implementation may take advantage of the running status. Your file likely employed such encoding methods.
I haven't looked at the mido codebase, so my answer is mostly related to MIDI as a whole, not this project in particular, which appears to be completely in-spec.
Edit: related discussions: