A measure of how rapidly and forcefully a key on a keyboard is pressed when the player initially presses the key. Velocity measurement is intended to simulate the behavior of a piano mechanism; a note struck on a piano is louder if the key is struck more forcefully. (There are other changes in the note sound of a piano as the velocity varies, but such is beyond the scope of this definition.) In the MIDI standard, a velocity value is transmitted with each note on message. Compare with aftertouch.
In synths, velocity is most commonly used to either set the peak level of the attack of an envelope generator, or set the overall volume of the note played. Both techniques allow the performer to emphasize certain notes by pressing the key more quickly. Other common uses are to use the velocity information to scale the overall rise and fall times of the envelope (all of the envelope segments happen faster when the velocity is higher), or to open up (move the cutoff frequency higher) a low pass filter more at higher velocities. Some samplers implement velocity switching, in which the velocity value is used to select a sample for playback from a set. The technique is most commonly used for sampling accoustic instruments, where the instrument is sampled using several different degrees of emphasis, and the samples are mapped to ranges of velocity values. MIDI/CV converters used with modular synthesizers usually make the velocity available as a separate control voltage, which the performer can route as desired.
If a given synth's keyboard does not support sensing of velocity, the synth is expected to send a fixed, non-zero velocity value in its outgoing note on messages. A quirk of the MIDI standard (and one that some older Yamaha models had trouble dealing with), is that the standard allows notes to be released by sending a note on message with a velocity value of 0, instead of using a note off message.
Some performers feel that the 127 possible values of velocity in the note on message does not provide sufficient resolution to express all of the subtlety of certain large-sample-set instruments (such as large piano sample sets). For this reason the high resolution velocity prefix extension to the MIDI standard was developed, although few keyboards implement it.