Copyright © 2007 , Kurt Nørmark | ![]() |
This page documents the Standard MIDI File DTD as provided for Scheme via LAML. The starting point of this DTD was the already existing MIDI XML DTD from the MIDI Manufacturers Association. I have extended the DTD in various ways, and for various purposes.
The Standard MIDI File language is made available as a Scheme library of functions that mirror the DTD. (In this context, Scheme is the name of a programming language). This is the same approach as used for many other DTDs supported by LAML. The advantage of providing the language as Scheme functions is that the Scheme programming language can be used to modify the MIDI contents via programmed solutions. Thus, the main idea with this facility is to convert MIDI files to Scheme programs, in which the musical contents can manipulated by Scheme functions. When the Scheme program is executed the corresponding standard MIDI file is generated.
In this document we do not describe any MIDI details. Please consult other resources, for instance the excellent descriptions of MIDI topics at http://www.borg.com/~jglatt/. For each MIDI element documented below, we refer to a particular pages of this very useful MIDI documentation..
There exists some examples of MIDI files together with their representation in Scheme and LAML. See examples.
The Midi Function Library provides useful functionality for various transformation of midi files.
ActiveSensing | |
AllNotesOff | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). |
AllSoundOff | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). |
ChannelKeyPressure | |
Continue | |
ControlChange | Sets the value of a particular controller, such as modulation wheel, bank selection, or pan. |
LocalControl | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). |
MTCQuarterFrame | |
Meta | |
MidiHeader | The header construct of a standard MIDI file. |
MidiTrack | There must be as many MidiTrack constituents as prescribed by the numberOfTracks attribute in the MidiHeader element. |
MonoMode | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). |
NonMidiSuffix | Trailing non-midi data which happens to be at the end of the standard midi file. |
NoteOff | A Note Off MIDI message. |
NoteOn | A Note On MIDI message. |
OmniOff | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). |
OmniOn | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). |
PitchBendChange | |
PolyKeyPressure | |
PolyMode | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). |
ProgramChange | Change of instrument (also known as Patch) of a particular channel. |
ResetAllControllers | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). |
SongPositionPointer | |
SongSelect | |
StandardMidiFile | This is the general purpose top-level construct for description of a Standard MIDI File. |
Start | |
Stop | |
SysEx | |
TimingClock | |
TuneRequest | |
TyrosMultiPad | This is a special purpose top-level construct for description of a Yamaha Tyros Multipad that consists of four tracks |
midi-file-to-laml | Convert a binary MIDI file, located at midi-file-path, to a LAML file with a single Scheme expression which represents the MIDI file. |
midi-files-to-laml-files | Do bulk conversion of a llist of midi files to LAML source files. |
note-name-to-note-number | Convert at note name to a note number. |
note-number-to-note-name | Convert at note number to a note name. |
![]() ![]() ![]() 1 Practical Introduction | |||
It is possible to convert at standard (binary) MIDI file to a Scheme expression, which uses the functions documented below on this page. The most flexible way to produce the Scheme XML-in-LAML form is to activate M-x midi-to-laml on an entry in an Emacs dired buffer. There is also a dired operate menu entry for this purpose. The midi-to-laml command produces a Scheme source file (with extension midl - abbreviating for midi laml) which you can edit. Please notice that the LAML Scheme source files with MIDI contents becomes very large, often more than one mega byte for a single song. Therefore it can take relatively long time to generate the LAML Scheme files. If you do not use Emacs with LAML you should start your Scheme system, load laml.scm and midi.scm, and call the function midi-file-to-laml. This approach is a little more complicated. The function midi-file-to-laml is documented below. When you the process the LAML file produced the way described above a (binary) standard MIDI file is created. The processing can be initiated as any other LAML processing (via Emacs, in an interactive Scheme shell, or from the command prompt of the operating system). Thus, in summary, we provide for parsing of binary MIDI files to a Scheme expression. If you are a Scheme programmer it will be easy for you to modify the MIDI contents via this expression. When you are done, you can evaluate the Scheme expression. In this way you produce a variant of the original MIDI file. | |||
![]() ![]() ![]() 2 Standard MIDI File structure | |||
As described in the attributes of MidiHeader we can use several modes when we generate the XML-in-LAML source file. The raw mode is not very interesting, because it is too low-level. Raw mode Scheme expressions reflect the underlying MIDI file directly, with both NoteOn and NoteOff messages. The deltaTime or absTime modes are recommended. In these modes NoteOff messages do not exists. Instead, each NoteOn messages has a duration. In absTime mode you can include messages with deltaTime attributes as well. Such messages becomes relative the either the previous message (which again can be a message with a deltaTime attribute, or it can be a message with an absTime attribute). In deltaMode you cannot include messages with absTime attributes. | |||
StandardMidiFile | |||
Description | This is the general purpose top-level construct for description of a Standard MIDI File. | ||
XML content model | ( ( MidiHeader , MidiTrack + ) , NonMidiSuffix ? ) | ||
TyrosMultiPad | |||
Description | This is a special purpose top-level construct for description of a Yamaha Tyros Multipad that consists of four tracks | ||
XML content model | ( MidiTrack + ) | ||
XML attributes Required: * Default values: red | mode * | ( deltaTime | absTime ) | Either absolute or relative timing |
image | CDATA | An icon name | |
name-1 * | CDATA | - | |
repeat-1 | ( true | false ) | - | |
chord-match-1 | ( true | false ) | - | |
image-1 | CDATA | - | |
name-2 * | CDATA | - | |
repeat-2 | ( true | false ) | - | |
chord-match-2 | ( true | false ) | - | |
image-2 | CDATA | - | |
name-3 * | CDATA | - | |
repeat-3 | ( true | false ) | - | |
chord-match-3 | ( true | false ) | - | |
image-3 | CDATA | - | |
name-4 * | CDATA | - | |
repeat-4 | ( true | false ) | - | |
chord-match-4 | ( true | false ) | - | |
image-4 | CDATA | - | |
play-only | NMTOKEN | A track/multipad number (either 1, 2, 3, or 4). If provided, play only this track. Alternatively, a boolean play-only attribute can be put on one of the MidiTrack elements. The TyrosMultiPad play-only dominates a MidiTrack play-only attribute. If no TyrosMultiPad play-only or no MidiTrack play-only attribute is given, play all tracks. | |
MidiHeader | |||
Description | The header construct of a standard MIDI file. Holds some front matters information which apply to the entire MIDI file. | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | format * | ( 0 | 1 | 2 ) | Represent the format of the MIDI file. This corresponds directly to the three different formats of MIDI files. |
target-format | ( 0 | 1 ) | - | |
numberOfTracks * | NMTOKEN | Represents the number of tracks. A MIDI format 0 file always has one track. | |
pulsesPerQuarterNote * | NMTOKEN | The resolution of a quarter note. | |
target-pulsesPerQuarterNote | NMTOKEN | - | |
mode * | ( raw | deltaTime | absTime ) | The mode of the generated LAML file. The value raw means that the LAML MIDI file is a direct reflection of the underlying MIDI file, with both NoteOn and NoteOff messages. The value deltaTime means that the time of an event is relative to the previous event, and that the NoteOff messages therefore have been elimiated. The value absTime means that the time of each event is absolute, and in addition that the NoteOff messages have been elimiated. | |
counterTransposition | NMTOKEN | An amount of transposition introduced to show note info that corresponds to actual playing at the keyboard. If you transpose n at the keyboard, give -n as counter transposition for this attribute. | |
See also | enclosing element | StandardMidiFile | |
MidiTrack | |||
Description | There must be as many MidiTrack constituents as prescribed by the numberOfTracks attribute in the MidiHeader element. The subelements of MidiTrack are elements that represent the individual MIDI messages. | ||
XML content model | ( NoteOn | NoteOff | PolyKeyPressure | ControlChange | ProgramChange | ChannelKeyPressure | PitchBendChange | AllSoundOff | ResetAllControllers | LocalControl | AllNotesOff | OmniOff | OmniOn | MonoMode | PolyMode | SysEx | MTCQuarterFrame | SongPositionPointer | SongSelect | TuneRequest | TimingClock | Start | Continue | Stop | ActiveSensing | Meta ) * | ||
XML attributes Required: * Default values: red | play-only | ( true | false ) | If true, play only this track. If no play-only attribute is given, play all tracks. The TyrosMultiPad play-only dominates a MidiTrack play-only attribute. |
See also | enclosing elements | StandardMidiFile TyrosMultiPad | |
NonMidiSuffix | |||
Description | Trailing non-midi data which happens to be at the end of the standard midi file. CASM data in Yamaha styles files is example of such data. Represented in hexadecimal notation. | ||
XML content model | (#PCDATA) | ||
See also | enclosing element | StandardMidiFile | |
![]() ![]() ![]() 3 MIDI Channel Messages | |||
In this section we describe the XML elements which corresponds to standard MIDI messages. Notice that the documentation of many attributes are repetitive (the same information is given for each element). In general, a channel is in between 1 and 16 at the LAML source level (0 and 15 at the binary MIDI level). You can use channels below 1 and above 16 for intermediate results, but only channels between 1 and 16 are taken into account when binary midi content is generated. | |||
NoteOn | |||
Description | A Note On MIDI message. | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
note * | NMTOKEN | The note number, between 0 and 127. Typically shown as a note name in the info attribute. This attribute represents information from the MIDI specification. | |
velocity * | NMTOKEN | The velocity, between 0 and 127. This attribute represents information from the MIDI specification. | |
duration | NMTOKEN | Only used in deltaTime and absTime mode. The duration of raw mode is represented by pairs of NoteOn and NoteOff elements. This attribute represents information from the MIDI specification. | |
chord | CDATA | A chord formed as an immediate concatenation of a root node and a chord type. This is not an essential attribute, and it does not itself affect the binary midi generated from this element. Root note is one of "C" "C#" "D" "D#" "E" "F" "F#" "G" "G#" "A" "A#" "B" (a string). Chord type is one of "1+8" "1+5" "M" "6" "M7" "M7b5" "M7(#11)" "9" "M7_9" "6_9" "b5" "aug" "7aug" "M7aug" "m" "m6" "m7" "m7b5" "m(9)" "m7(9)" "m7(11)" "mM7b5" "mM7" "mM7(9)" "dim" "dim7" "7" "7sus4" "7(9)" "7(#11)" "7(13)" "7b5" "7(b9)" "7(b13)" "7(#9)" "sus4" "sus2" (a string). | |
strum-length | NMTOKEN | A special purpose attribute used for strumming. An integer. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | NoteOn | |
NoteOff | |||
Description | A Note Off MIDI message. NoteOff elements cannot be used in detaTime and in absTime mode. Only use NoteOff elements in raw mode. | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
note * | NMTOKEN | The note number, between 0 and 127. Typically shown as a note name in the info attribute. This attribute represents information from the MIDI specification. | |
velocity * | NMTOKEN | The velocity, between 0 and 127. This attribute represents information from the MIDI specification. | |
duration | NMTOKEN | - | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | NoteOff | |
PolyKeyPressure | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
note * | NMTOKEN | The note number, between 0 and 127. Typically shown as a note name in the info attribute. This attribute represents information from the MIDI specification. | |
pressure * | NMTOKEN | The amount of pressure, between 0 and 127. This attribute represents information from the MIDI specification. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | PolyKeyPressure | |
ProgramChange | |||
Description | Change of instrument (also known as Patch) of a particular channel. | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | - | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
number * | NMTOKEN | A program change number. A GM instrument number. Between 0 and 127. This attribute represents information from the MIDI specification. | |
See also | MIDI specification details | ProgramChange | |
Instrument numbers | Table | ||
enclosing element | MidiTrack | ||
ChannelKeyPressure | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
pressure * | NMTOKEN | ||
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | ChannelKeyPressure | |
PitchBendChange | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
value * | NMTOKEN | ||
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | PitchBendChange | |
![]() ![]() ![]() 4 MIDI channel messages: Control change | |||
ControlChange | |||
Description | Sets the value of a particular controller, such as modulation wheel, bank selection, or pan. | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
control * | NMTOKEN | ||
value * | NMTOKEN | ||
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | ControlChange | |
AllSoundOff | |||
Description | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | AllSoundOff | |
ResetAllControllers | |||
Description | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | ResetAllControllers | |
LocalControl | |||
Description | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
value * | ( off | on ) | ||
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | LocalControl | |
AllNotesOff | |||
Description | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). A channel mode message, which is a subcategory of the control change messages. The control number is 123. | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | AllNotesOff | |
OmniOff | |||
Description | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). A channel mode message, which is a subcategory of the control change messages. The control number is 124. | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | OmniOff | |
OmniOn | |||
Description | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | OmniOn | |
MonoMode | |||
Description | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
value * | NMTOKEN | ||
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | MonoMode | |
PolyMode | |||
Description | A specialized ControlChange event, which happens to have its own name (because of the XML starting point from MIDI Manufacturers Association). | ||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
channel * | ( 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 ) | The channel number between 1 and 16. Internally we subtract one channel when binary MIDI files are created. This attribute represents information from the MIDI specification. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | PolyMode | |
![]() ![]() ![]() 5 System messages | |||
System messages are not particular to any midi channel. | |||
SysEx | |||
Description | |||
XML content model | (#PCDATA) | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | - |
absTime | NMTOKEN | - | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | SysEx | |
MTCQuarterFrame | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
value * | NMTOKEN | - | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | MTCQuarterFrame | |
SongPositionPointer | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
position * | NMTOKEN | ||
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | SongPositionPointer | |
SongSelect | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
number * | NMTOKEN | ||
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | SongSelect | |
TuneRequest | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | TuneRequest | |
TimingClock | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | TimingClock | |
Start | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | Start | |
Continue | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
See also | enclosing element | MidiTrack | |
Stop | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | Stop | |
ActiveSensing | |||
Description | |||
XML content model | EMPTY | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | ActiveSensing | |
Meta | |||
Description | |||
XML content model | (#PCDATA) | ||
XML attributes Required: * Default values: red | deltaTime | NMTOKEN | The delta time of this MIDI message. Relative to the previous MIDI message. If a deltaTime attribute appears a absTime attribute is not allowed. |
absTime | NMTOKEN | The time absolute. If an absTime attribute appears a deltaTime attribute is not allowed. | |
info | CDATA | Helpful information derived from other attributes. You should never modify this attribute, because it is not processed in any way. Always change the attributes which have direct MIDI counterparts. | |
type * | NMTOKEN | ||
See also | enclosing element | MidiTrack | |
See also | MIDI specification details | Meta | |
![]() ![]() ![]() 6 Other functions | |||
midi-file-to-laml | |||
Form | (midi-file-to-laml midi-file-path laml-file-path mode) | ||
Description | Convert a binary MIDI file, located at midi-file-path, to a LAML file with a single Scheme expression which represents the MIDI file. Write the Scheme expression to a text file located at laml-file-path. mode is either raw, absTime or deltaTime. raw: delta times with NoteOn and NoteOff. absTime: absolute times with durations. deltaTime: delta times with duration. | ||
midi-files-to-laml-files | |||
Form | (midi-files-to-laml-files input-dir midi-file-list output-dir mode) | ||
Description | Do bulk conversion of a llist of midi files to LAML source files. | ||
note-number-to-note-name | |||
Form | (note-number-to-note-name n) | ||
Description | Convert at note number to a note name. The inverse function is note-name-to-note-number. | ||
note-name-to-note-number | |||
Form | (note-name-to-note-number name) | ||
Description | Convert at note name to a note number. The inverse function is note-number-to-note-name. The note names in, for instance octave number 3, are C3, C#3, D3, D#3, E3, F3, F#3, G3, G#3, A3, A#3, and B3. Both upper and lower case note names are OK. | ||
Mirror name: | midi |
Automatic loading of common XML-in-LAML library? | No |
List of action elements | (StandardMidiFile TyrosMultiPad) |
Generation of named mirror functions: | Yes |
Mirror name prefix: | None |
Transliteration of CDATA? | Yes |
List of elements for which transliteration does not apply: | '() |
List of elements for which all white spacing is preserved: | '() |
Name of HTML character transformation table: | html-char-transformation-table |
Are default DTD attributes passed explicitly? | No |
Are attributes only allowed to be text strings? | Yes |
Is extended textual contents allowed? | No |
Is white space represented by this mirror? | Yes |
How are duplicated XML attributes handled: | 'keep-all |