**MIDI -- Musical Instrument Digital Interface notation
The **MIDI representation is a Humdrum version of the well-known MIDI standard. MIDI is an industry standard used to exchange information between sound synthesizers. MIDI is also used in various software applications such as some music printing software. MIDI is a type of "tablature" notation. It describes a set of performance actions rather than specifying the sounded result. MIDI represents note-on, note-off, information, for various "channels." MIDI events include note-on, note-off, key-velocity, after-touch, control codes, and system-exclusive codes. MIDI does not represent many other musically-pertinent signifiers, such as ties, slurs, phrasings, ornaments, etc. MIDI does not represent rests.
It is recommended that files containing predominantly
**MIDIdata should be given names with the distinguishing `.hmd' extension.
The following table summarizes the **MIDI mappings of signifiers and signifieds.
0-9 decimal values / value delimiter = barline; == double barline - note off Summary of **MIDI Signifiers
A sample document is given below:Each **MIDI data token consist of three elements or components. Each element is an integer value; elements within a data token are delimited by the slash character (/).
!! C-major scale. **MIDI *Ch8 72/60/64 72/-60/64 72/62/64 36/-62/64 36/64/64 36/-64/64 36/65/64 36/-65/64 36/67/64 36/-67/64 36/69/64 36/-69/64 36/71/64 36/-71/64 36/72/64 72/-72/64 *-
The first element in a data token represents the number of clock ticks (since the previous event) before the event is to occur. The absolute duration of a single clock tick is determined by the MIDI clock speed, which is variable.
The second --ent in a data token represents the MIDI key number -- that is, the address of the key event. Key events can be either key-on or key-off. Key-on events are represented by positive integers, whereas key-off events are represented by negative integers. For example, -60 means to turn-off key 60.
The third element in a data token represents the MIDI key-velocity value. MIDI instruments normally interpret key-velocity as dynamic or accent information. Higher key-velocity values are associated with accented notes. Permissible key-velocity values range between 0 and 127. encodings. In the case of key-off events, the key-velocity component represents the after-touch.
Note that the key-velocity component of a data token is optional and need not appear. However, both the clock-tick value and the key-event values must be present in each **MIDI data token.
Barlines are represented using the "common system" for barlines -- see barlines.
The following Humdrum commands accept **MIDI encoded data as inputs:The following Humdrum commands produce **MIDI data as outputs:
cents translates **MIDI to **cents fade fade-in or fade-out **MIDI data freq translates **MIDI to **freq kern translates **MIDI to **kern perform play Humdrum **MIDI files pitch translates **MIDI to **pitch semits translates **MIDI to **semits smf generate standard MIDI file solfg translates **MIDI to **solfg tonh translates **MIDI to **Tonh
The following tandem interpretations can be used in conjunction with **MIDI:
Tandem interpretations for **MIDI
barlines, **cents, **freq, **kern, **pitch, **semits, **specC, **Tonh