TuningTuning

This allows the sharing of "microtunings" (user-defined scales other than 12-tone equal temperament) among instruments, and the switching of these tunings during real-time performance.

The messages include:

  • Bulk Tuning Dump Request (non-real-time)
  • Bulk Tuning Dump (non-real-time)
  • Single-note Tuning Change (real-time)

Even though the first two messages are in the Universal Non-Real Time area and the last in the Real Time area, they keep the same sub-IDs to more obviously group them and possibly ease the parsing of them. Single Note Retuning allows retuning of individual MIDI note numbers to new frequencies in real time as a performance control.

The specification does not attempt to dictate how any manufacturer implements microtuning, but provides a general means of sharing tuning data among different instruments. This goal requires some shared assumptions which have some architectural implications. The standard requires that any of the 128 defined MIDI key numbers (or at least those MIDI key numbers covered by the instrument’s playable range) be tunable to any frequency within the proposed frequency range. The standard also strongly suggests, but does not enforce, an exponential (constant cents) rather than linear (constant Hertz) tuning resolution across the instrument’s frequency range.

The specification permits the changing of tunings in real-time, both by the selection of presets and on a per-note basis. When a sounding note is affected by either real-time tuning message, the note should instantly be re-tuned to the new frequency while it continues to sound; this change should occur without glitching, forced Note-Offs, re-triggering or other audible artifacts (see section 4, "Additional").

The specification provides for 128 tuning memory locations (programs). As with the MIDI program change message, this is a maximum value. An instrument supporting MIDI Tuning may have any lesser number of tuning programs. The specification requires only that all existing tuning programs respond to the messages as specified (See section 3, "Continuous Controller Messages").

Although directly applicable to some existing instruments, the specification attempts to define a coherent framework within which the designers of future instruments can profitably work. It is hoped that by providing this framework the specification will make microtunability more easily implemented and more common on MIDI instruments.

Frequency data format

The frequency resolution of MIDI Tuning should be stringent enough to satisfy most demands of music and experimentation. The specification provides resolution somewhat finer than one-hundredth of a cent. Instruments may support MIDI tuning without necessarily providing this resolution in their hardware; the specification simply permits the transfer of tuning data at any resolution up to this limit.

Frequency data shall be sent via system exclusive messages. Because system exclusive data bytes have their high bit set low, containing 7 bits of data, a 3-byte (21-bit) frequency data word is used for specifying a frequency with the suggested resolution. An instrument which does not support the full suggested resolution may discard any unneeded lower bits on reception, but it is preferred where possible that full resolution be stored internally, for possible transmission to other instruments which can use the increased resolution.

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.875 Hz. The first byte of the frequency data word specifies the nearest equal-tempered semitone below 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.

One of these values ( 7F 7F 7F ) is reserved to indicate not frequency data but a "no change" condition. When an instrument receives these bytes as frequency data, it should make no change to its stored frequency data for that MIDI key number. This is to prevent instruments which do not use the full range of 128 MIDI key numbers from sending erroneous tuning data to instrument which do use the full range. The three-byte frequency representation may be interpreted as follows:

0xxxxxxx 0abcdefg 0hijklmn

xxxxxxx = semitone
abcdefghijklmn = fraction of semitone, in .0061-cent units
Examples of frequency data:

00 00 00 = 8.1758 Hz (C – normal tuning of MIDI key no. 0)
00 00 01 = 8.2104 Hz
01 00 00 = 8.6620 Hz
0C 00 00 = 16.3516 Hz
3C 00 00 = 261.6256 Hz (middle C)
3D 00 00 = 277.1827 Hz (C# – normal tuning of MIDI key no. 61)
44 7F 7F = 439.9984 Hz
45 00 00 = 440.0000 Hz (A-440)
45 00 01 = 440.0016 Hz
78 00 00 = 8372.0190 Hz (C – normal tuning of MIDI key no. 120)
78 00 01 = 8372.0630 Hz
7F 00 00 = 12543.8800 Hz (G – normal tuning of MIDI key no. 127)
7F 00 01 = 12543.9200 Hz
7F 7F 7E = 13289.7300 Hz (top of range)
7F 7F 7F = no change (reserved)

Bulk tuning dump request

A bulk tuning dump request is as follows:

F0 7E <device ID> 08 00 tt F7

F0 7E Universal Non-Real Time SysEx header
<device ID> ID of target device
08 sub-ID#1 (MIDI Tuning)
00 sub-ID#2 (bulk dump request)
tt tuning program number (0 – 127)
F7 EOX

The receiving instrument shall respond by sending the bulk tuning dump message described in the following section for the tuning number addressed.

Bulk tuning dump

A bulk tuning dump comprises frequency data in the 3-byte format outlined in section 1, for all 128 MIDI key numbers, in order from note 0 (earliest sent) to note 127 (latest sent), enclosed by a system exclusive header and tail. This message is sent by the receiving instrument in response to a tuning dump request.

F0 7E <device ID> 08 01 tt <tuning name> [xx yy zz] ... chksum F7

F0 7E Universal Non-Real Time SysEx header
<device ID> ID of responding device
08 sub-ID#1 (MIDI Tuning)
01 sub-ID#2 (bulk dump reply)
tt tuning program number (0 – 127)
<tuning name> 16 ASCII characters
[xx yy zz] frequency data for one note (repeated 128 times)
chksum cchecksum (XOR of 7E <device ID> nn tt <388 bytes>)
F7 EOX

If an instrument does not use the full range of 128 MIDI key numbers, it may ignore data associated with un-playable notes on reception, but it is preferred where possible that the full 128-key tuning be stored internally, for possible transmission to other instruments which can use the increased resolution. On transmission, it may if necessary pad frequency data associated with un-playable notes with the "no change" frequency data word defined above. For keys in the instrument’s key range, the pitch that is sent should be the pitch that key would play if it were received as part of a note-on message. For keys outside the key range, 7F 7F 7F may be sent.

Single note tuning change (real time)

The single note tuning change message (Exclusive Real Time sub-ID#1 = 08) permits on-the-fly adjustments to any tuning stored in the instrument’s memory. These changes should take effect immediately, and should occur without audible artifacts if any affected notes are sounding when the message is received.

F0 7F <device ID> 08 02 tt ll [kk xx yy zz] F7

F0 7F Universal Real Time SysEx header
<device ID> ID of target device
08 sub-ID#1 (MIDI Tuning)
02 sub-ID#2 (note change)
tt tuning program number (0 – 127)
ll number of changes (1 change = 1 set of [kk xx yy zz])
[kk] MIDI key number
[xx yy zz] frequency data for that key (repeated ‘ll’ number of times)
F7 EOX

 

This message also permits (but does not require) multiple changes to be embedded in one message, for the purpose of maximizing bandwidth. The number of changes following is indicated by the byte ll; the total length of the message equals 8 + (ll x 4) bytes.

If an instrument does not support the full range of 128 MIDI key numbers, it should ignore data associated with un-playable notes on reception.

This message can be used to make changes in inactive (background) tunings as well. This message may also, at the discretion of the manufacturer, be transmitted by the instrument under particular circumstances (for example, while holding down one or more keys and pressing a "send-single-note-tuning" front panel button).

Changing tuning programs

Registered parameter numbers 03 and 04 are used to select any of the instrument’s stored tunings as the "current" or active tuning. Instruments which permit the storage of multiple microtunings should respond to these messages by instantly changing the "current" tuning to the specified stored tuning. This change takes effect immediately and must occur without audible artifacts (notes-off, resets, re-triggers, glitches, etc.) if any affected notes are sounding when the message is received.

As with the MIDI program change message, no assumptions are made as to the underlying architecture of the instrument. For instance, in cases where layered or multi-timbral sounds might be assigned to different tunings, so that more than one tuning might be active, the manufacturer may decide how best to interpret these messages. The basic channel number might prove useful in discriminating between multiple active tunings, or a certain range of tuning programs might be set aside and defined as active.

The Tuning Program Select message is sent as a Registered Parameter number 03 controller message, followed by either a data entry, data increment, or data decrement controller message, e.g. (with running status shown):

Bn 64 03 65 00 06 tt (data entry)
Bn 64 03 65 00 60 7F (data increment)
Bn 64 03 65 00 61 7F (data decrement)

n = basic channel number
tt = Tuning Program number (1-128)

Likewise, the Tuning Bank Select Registered Parameter number 04 is sent as follows:

Bn 64 04 65 00 06 tt (data entry)
Bn 64 04 65 00 60 7F (data increment)
Bn 64 04 65 00 61 7F (data decrement)

n = basic channel number
tt = Tuning Bank number (1-128)

For maximum flexibility, this Bank Number is kept separate from the normal Program Change Bank Select (controller #00). However, an instrument may wish to link the two as a feature for the user, especially if a tuning bank is stored alongside a patch parameter bank (for example, on a RAM cartridge).

If an instrument receives a Tuning Program or Bank number for which it has no Program or Bank, it should ignore that message. Standard mappings of "common" tunings to program numbers are not being proposed at this time.

Comments:

There is some question as to whether instantaneous response to real-time tuning changes is desirable in every circumstance. In some performance situations it makes more sense if a tuning change affect only those notes which occur subsequent to the change, and not affect sounding notes. But there are also situations in which tuning changes should take place instantaneously, as specified in the standard, and should affect sounding notes without disrupting their continuity.

If the instrument responds well in the latter situation, some work-around is possible for the former. The reverse is not true. Therefore the standard requires that tuning changes immediately affect sounding notes. Manufacturers might, however, consider implementing a switchable "instantaneous/next-note-on" option within an instrument.

Single Note Retuning is intended for performance. Because of there are two primary concerns: 1) the RAM required for temporary copies of tuning tables; and 2) the computational load of smoothly updating the pitch of affected active notes. It is clear that in order to recognize the Single Note Retune message, a copy of the current Tuning Program needs to be kept in RAM. In a multi-timbral environment there is potentially a copy for each virtual instrument. A high-end instrument could afford the upwards of 8K of RAM needed for per-virtual-instrument copies. More modest instruments may choose to only implement one alterable RAM table and either make it available only to the basic channel virtual instrument or require that all instruments share the same tuning. Provided that it is explained in the user’s manual, any of these methods is acceptable.

Specification ©1985-1996 MIDI Manufacturers Association. All rights reserved.