I've noticed that sometimes Logic or my midi devices send [144,*,0]
(where *
is the note) when a note is complete, and other times sends [128,*,64]
. What's the difference?
1 Answer
The first is a note-on with velocity 0 (which the standard demands to be interpreted as a note-off event) and the second is a note-off with velocity 64. Why would you send the former? Because of "running status" bytes. When a command byte is the same as the last command byte (in this case, "note on"), it can be left off from the stream and just the data bytes get sent. That makes for an average of two bytes per note-on/off event instead of three for single notes, which when using the original current-loop MIDI connection with 31.250kbps can make quite a difference with regard to throughput.
The disadvantage, of course, is that there is no note-off velocity getting transferred when using a note-on with speed 0. For a piano, that's usually not making much of a difference. For an instrument such as accordion, it may make a difference with regard to button noise. Other instruments may also have their own interpretation of note-off velocity.
-
5I think this is the first instance I've read of someone providing the use case for note-off velocity (i.e. for MIDI voices that actually implement it like accordion). +1– fdcppJun 8, 2022 at 11:36
-
-
I think running status would only be relevant if two or more key events happen within about 1ms of each other, and that for consistent operation one would want to retransmit the note-on or note-off header byte unless a second key was pushed before a device had begun to transmit the velocity byte of the first note.– supercatJun 8, 2022 at 21:23
-
@supercat Remember that while MIDI may have originated as a way to transmit the performance of one person on one keyboard, it's also used for sequencing complex parts, song playback, machine control, lighting… (Of course, running status will save <33% once different channels or message types are involved, but every little helps.)– giddsJun 8, 2022 at 21:46