Velocity compression

Each MIDI Note-On message has a velocity value between 1-127. The velocity corresponds to how hard the key was struck. In velocity scaling, (more accurately called a velocity offset), a group of notes is selected for editing and then their velocities are all cut or boosted in a linear manner: e.g., with a scaling value of -20, three notes originally recorded with velocities of 65, 91, and 37 would be set to play back with velocities of 45, 71, and 17, respectively. In velocity compression (sometimes called velocity scaling), the velocities are multiplied or divided by some factor so that the differences between them get larger or smaller. With a compression value of 75%, for example, the same three notes would be played back with velocities of 49, 68, and 28. This means that the note with the largest starting velocity is reduced the most, while soft notes play back closer to their original velocity, helping to keep them audible. Thus, compression is a better way to smooth out the transients in a passage that were played too loudly, without changing the musical dynamics of the piece.