The Interpretation of MIDI Velocity
Roger B. Dannenberg
School of Computer Science, Carnegie Mellon University
[email protected]
Abstract
The MIDI standard does not specify how MIDI key velocity
is to be interpreted. Of course, individual synthetic instruments respond differently, but one would expect that on average, instruments will respond about the same. This study
aims to determine empirically how hardware and software
MIDI synthesizers translate velocity to peak RMS amplitude. Analysis shows synthesizers roughly follow an xsquared rather than exponential mapping. Given a desired
dynamic range (from velocity 1 to 127), a square-law
mapping from velocity to RMS is uniquely determined,
making dynamic range a convenient way to summarize
behavior. Surprisingly, computed values of dynamic range
for commercial synthesizers vary by more than 60dB.
The next section expands upon the motivation as well as
some musical and esthetic concerns relating to this work.
Section 3 describes what I measure to study velocity, and
Section 4 describes how I measure it. Section 5 introduces a
model for sound variation as a function of velocity, and
Section 6 fits this model to actual synthesizers. This is
followed by some discussion and conclusions.
A Broader Introduction
Technical Introduction
MIDI key velocity (Rothstein 1995) is normally an indication of dynamic level or loudness, but the MIDI standard
(MMA 1996) does not specify exactly how velocity should
be interpreted. In synthesizers, key velocity can control
many parameters, including amplitude, FM modulation
depth, and sample selection. Even when velocity is used
simply to scale audio amplitude, it is unclear how to map
MIDI velocity to amplitude.
In order to create a truly "MIDI compatible" system, one
should try to be consistent with existing implementations so
that similar key velocity values result in similar output levels. Lacking any published recommendations or specifications, I measured many programs (instruments) on a handful
of synthesizers to determine how key velocity maps to peak
RMS amplitude.
At the outset of this work, I assumed that MIDI velocity
would be logarithmically related to amplitude since it is
well-known that perceived loudness is also quasi-logarithmic. A logarithmic scale would allow a wide dynamic range
to be represented efficiently by the 7-bit velocity value in
MIDI messages. One finding is that a logarithmic relationship is not a good fit to a variety of commercial synthesizers
and patches. Overall, a square-root function is a better, and
in some cases nearly exact, model of MIDI velocity as a
function of RMS amplitude. However, synthesizers and
programs appear to be quite inconsistent. We can make recommendations for MIDI-controlled instruments, but there is
hardly a de facto standard.
MIDI seems to be a permanent fixture on the computer
music landscape. It has been used for more than twenty
years almost without change, and it has survived a major
transition from serving as a real-time hardware control protocol to a data format for music that is realized entirely in
software. MIDI is even used to specify ring tones for cell
phones, possibly the largest application of music synthesis
technology to date.
MIDI is not without shortcomings, and the limitations of
MIDI have been lamented by more than one author. (Moore
1988, Wessel and Wright 2002) Various proposals to extend
or replace MIDI have also appeared. (McMillen 1994,
Wright 1997) Nevertheless, MIDI has proven to be resilient,
durable, and well-understood. The perceived benefits of
MIDI compatibility usually outweigh any implementation
difficulty, so most computer music systems handle MIDI
messages and standard MIDI files.
One of the features of MIDI is that it supports the notion
of the music score (or sequence of MIDI messages) as an
abstract specification that can be "performed" by a variety
of synthesizers. This has roots in Western music, common
practice notation, and music performance practice - music
scores can be played by different performers using different
instrumentation.
Many computer musicians have rejected this notion outright, replacing vague sequences of MIDI messages with
precise specifications of the entire sound production process
using software synthesis. In this approach, the "instrument,"
its control, and even the notion of score are often integrated
into a single software program, patch, or configuration,
giving precise control of sound from human gesture all the
way down to the details of sample-by-sample computation.
Now that we have experienced music-making with
MIDI-based systems and more general software-based systems, we can observe that these two approaches naturally
lead composers in very different directions. In particular, we
193