MIDI tuning standard

MIDI Tuning Standard (MTS) is a specification of precise musical pitch agreed to by the MIDI Manufacturers Association in the MIDI protocol. MTS allows for both a bulk tuning dump message, giving a tuning for each of 128 notes, and a tuning message for individual notes as they are played.

Frequency values
If $f$ is a frequency in Hertz (Hz), then the corresponding note number $N$$undefined$ is given by the formula


 * $$ N_\mathsf{MIDI} = 69 + 12 \cdot \log_2 \left(\frac{ f }{\ 440\ \mathrm{Hz}\ }\right) = 69 + \frac{ 12 }{\ \log 2\ } \log \left(\frac{ f }{\ 440\ \mathrm{Hz}\ }\right)\ ,$$

where "$log$" in the second expression is any logarithm (e.g. either the common logarithm $log10$, the natural logarithm $ln ≡ loge$ , or any other).

The quantity $log_{2}( f⁄440 Hz )$ is the number of octaves above the 440 Hz concert, or $4$, or $a$&prime;. Multiplying it by 12 gives the number of semitones above 440 Hz (the value is negative if the frequency $f$ is lower in pitch than 440 Hz). Adding 69 (decimal, or 0x45 hexadecimal) gives the number of semitones above the five octaves below middle.

Not only is 440 Hz the standard central pitch for, it is also widely used as the "concert " standard pitch ($4$ e.g. USA, UK), and since that is represented in signals by the integer 69 (nine semitones above middle  ($4$, $c&prime;$), which is 60 decimal or 0x3C hexadecimal), this gives a real number which expresses pitch in a manner consistent with  and integer notation, known as the  note number, $N$$undefined$.

Converting from note number ($N$$undefined$) to frequency ($f$) is given by the following formula:


 * $$\ f = 440\ \mathsf{Hz} \cdot 2^{\left[\ \left(\ N_\mathsf{MIDI}\ -\ 69\ \right)/12\ \right]}\ = 440\ \mathsf{Hz} \cdot \exp\left[\ \frac{\ \ln 2\ }{ 12 } \left(\ N_\mathsf{MIDI}\ -\ 69\ \right)\ \right] ~.$$

Frequency Data Format
The frequency data format allows for the precise notation of frequencies that differ from equal temperament.

"Frequency data shall be defined in [units] which are fractions of a semitone. The frequency range starts at MIDI note 0, C = 8.1758 Hz, and extends above MIDI note 127, G = 12543.854 Hz. The first byte of the frequency data word specifies the highest equal-tempered semitone not exceeding the frequency. The next two bytes (14 bits) specify the fraction of 100 cents above the semitone at which the frequency lies. Effective resolution = 100 cents / 214 = .0061 cents."

This higher resolution allows a logarithmic representation of pitch in which the semitone is divided into 1282 = 214 = 16384 parts, which means the octave is divided into 196608 (logarithmically) equal parts. These parts are exactly 100/16384 cents (approximately 0.0061 cents) in size, which is far below the threshold of human pitch perception and which therefore allows a very accurate representation of pitch.

Applications
The precision pitch values may be used in microtonal music, just intonation, meantone temperament, or other alternative tunings.

Software which supports MTS includes Scala, TiMidity++, ZynAddSubFX and FluidSynth.

Software plugin instruments which support MTS include Native Instruments FM8, Synthogy Ivory, and Xen-Arts' various xenharmonic VSTi plugins, including the FMTS FM synthesizer, Ivor virtual analog synthesizer, and XenFont SoundFont sample player.

Hardware instruments in current production which support MTS include: Dave Smith Instruments (DSI) Rev-2, Prophet-12, Prophet-6, Oberheim OB-6, Moog Sub37, Minitaur, Novation Bass Station II, Peak, Sonoclast Plastic Pitch Plus, and the Waldorf Kyra.

MTS specification

 * MTS specification

Microtonal music software supporting MTS

 * Scala (Windows, Linux, Mac)
 * Custom Scale Editor (Windows, Mac)
 * microsynth (Windows, Mac)
 * alt-tuner (Windows, Linux, Mac)
 * TiMidity++ (Windows, Linux, Mac)
 * FluidSynth (Windows, Linux, Mac)
 * Tune Smithy (Windows)
 * Xen-Arts Microtonal MIDI Software (Windows VSTi)
 * Relayer (Windows, Mac)
 * L'il Miss' Scale Oven (Mac)
 * Gervill (Windows, Linux, Mac)