Philippe Guillaume wrote:I don't get your point regarding reality: if you release a real piano key very, very gently, it means you do release it, so you have some positive release velocity, say 1 or 2... (not 0), and the note will stop after a certain time, whether an acoustic piano or Pianoteq. But, as EvilDragon said, velocity 0 means you do not release it all, not even "gently", so the sound lasts forever (well, as long as the instrument itself is capable).
The MIDI standard (the "MIDI 1.0 Detailed specification") does not explicitly specify a separate velocity definition for Note-Off events, but it is clear on Note-Off events always "turning off" the note. So for midi message stream consistency, any Note-Off events (a Note-On event with velocity 0 is considered a Note-Off event at velocity 64 as per the standard) would have to be interpreted as a release of the key.
While "interpretation of the Velocity byte is left up to the receiving instrument" (note that this does not exempt the SENDING instrument from obeying the further specification in the standard), in order not to violate the above condition, I believe there are only two ways of reading the standard:
a) You stick with "Generally, the larger the numeric value of the message, the stronger the velocity-controlled effect", and considering the special case indicated for velocity 0 to only apply to Note-On, you thus accept the entire scale from 0-255 as representing an increasing scale of the speed of release.
b) You apply the scale indicated at the end of the "VELOCITY" section to Note-Off verbatim. Then you get 1-127 for ppp-fff, and 0 for "off" with the clear definition in the caption of that scale: "vvvvvvv = 0: Note-Off (with velocity of 64)"
Of course, the conclusion from these options (b being a literal interpretation, but a probably a more likely actual implementation on the sending end) might be that the actual velocity of a Note-Off event with a transmitted velocity of zero is undefined.
But in either case, a Note-Off is still a Note-Off. (At the same time, obviously sending a Note-Off with velocity zero at all shows that the designers of the keyboard delivering it did not much care about the robustness principle.)