Hi. Does the midi protocol establish how the controllers reduce the key velocity to a value from 0 to 127? or does each controller do it differently?
Thank you
There are various methods. But the most common method is that under each key are 2 switches at different heights. As the key moves down, the time between the 2 switches closing is used to determine the velocity. This is not defined by MIDI, just a common design solution.
Mike.
Chair of MIDI 2.0 Working Group
Mike thank you. This information is also important to me, but the thing I wanted to ask is what happens next. That is, what kind of mathematical function brings this potentially unlimited value back to an integer from 0 to 127. Can you help me? thank you
The General MIDI 2 specification says that "The velocity effect on volume is not defined". But it does define the response to the Channel Volume and Expression controllers as dB = 40 × log₁₀ (127 / velocity). (Many devices allow to select different velocity response curves.)
The DLS specification defines the response to Velocity, Volume, and Expression as dB = 20 × log₁₀ (127² / velocity²):
The only thing that the MIDI specifiaction says about Note On velocity is this:
"Preferably, application of velocity to volume should be an exponential function."
Additionally, I should add that, Note On velocity is from 1 to 127, Note On velocity zero is a Note Off command.
Thank you all, but I see that I can't make the point understand: i don't need a velocity to db formula, i need a m / s to velocity formula. If the midi defines it.
There is no such information in the MIDI specification.
You can download the specification from the "Specs" section youself, and take a look at the "Complete MIDI 1.0 Detailed Specification" available in .pdf form,