Douglas Lyon
Fall 1995
© IEEE Computer Society Press.
2.3. Meta-Events
A few meta-events are defined herein. It is not required for every program to support every meta-event. Meta-events initially defined include:
- 255, 0, 2, ssss
- Sequence Number This optional event, which must occur at the beginning of a track, before any non zero delta-times, and before any transmittable MIDI events, specifies the number of a sequence. The number in this track corresponds to the sequence number in the new Cue message discussed at the summer 1987 MMA meeting. In a format 2 MIDI file, it is used to identify each "pattern" so that a "song" sequence using the Cue message refers to the patterns. If the ID numbers are omitted, the sequences' locations in order in the file are used as defaults. This number should be contained in the first track for format 0 or 1 files. Transfer of several multitrack sequences is done by grouping format 1 files with a different sequence number.
- 255, 1, len text
- Text Event. Any amount of text. Typically a text event appears at the beginning of a track. It contains the track name and orchestration. Text events are permitted anywhere in a track, for lyrics, or cue points, for example. The text should be printable ASCII characters. However, other character codes using the high-order bit may be used for interchange of files between different programs on the same computer which supports an extended character set. Programs that do not support non-ASCII characters should ignore them.
Meta event types 1-15 are reserved for special types of text events:
- 255, 2, len, text
- Copyright Notice. A copyright notice in printable ASCII text. The notice should contain the characters (C), the year of the copyright, and the owner of the copyright. Several pieces of music in the same MIDI file have the copyright notices this event field. This event should be the first event in the first Track Packet, at time 0.
- 255 3, len, text
- Sequence/Track Name. If a format 0 track or the first track in a format 1 file then the name of the sequence, otherwise, the name of the track.
- 255, 4, len, text
- Instrument Name. Description of the instrumentation type. May be used with the MIDI Prefix meta-event to specify which MIDI channel the description applies to, or the channel may be specified as text.
- 255, 5, len, text
- Lyric. A lyric to be sung. Generally, each syllable will be a separate lyric event which begins at the event's time.
- 255, 6, len, text
- Marker. Normally in a format 0 track, or the first track in a format 1 file. The name of that point in the sequence, such as a rehearsal letter or section name ("First Verse", etc.).
- 255, 7, len, text
- Cue Point. A description of something happening on a film or video screen or stage at that point in the musical score ("Car crashes into house", "curtain opens", "she slaps his face", etc.)
- 255, 47, 0,
- End of Track. This event is not optional. It is included so that an exact ending point may be specified for the track, so that it has an exact length, which is necessary for tracks which are looped or concatenated.
- 255, 81, 3, tttttt
- Set Tempo. Sets tempo in microseconds per MIDI quarter-note This event indicates a tempo change. Another way of putting "microseconds per quarter-note" is "24ths of a microsecond per Midi Clock". Representing tempos as time per beat instead of beat per time allows absolutely exact long-term synchronization with a time-based sync protocol such as SMPTE time code or MIDI time code. This amount of accuracy provided by this tempo resolution allows a four-minute piece at 120 beats per minute to be accurate within 500 usec at the end of the piece. Ideally, these events should only occur where Midi Clocks would be located Q this convention is intended to guarantee, or at least increase the likelihood, of compatibility with other synchronization devices so that a time signature/tempo map stored in this format may easily be transferred to another device.
- 255, 84, 5, hr, mn, se, fr, ff
- SMPTE Offset. This optional event designates the SMPTE time at which the Track Packet is supposed to start. It should be present at the beginning of the track. The hour must be encoded with the SMPTE format, just as it is in MIDI Time Code. In a format 1 file, the SMPTE Offset must be stored with the tempo map, and has no meaning in any of the other tracks. The ff field contains fractional frames, in 100ths of a frame, even in SMPTE-based tracks which specify a different frame subdivision for delta-times.
- 255, 88, 4, nn, dd, cc, bb
- Time Signature. The time signature is expressed as four numbers. nn and dd represent the numerator and denominator of the time signature as it would be notated. The denominator is a negative power of two: 2 represents a quarter-note, 3 represents an eighth-note, etc. The cc parameter expresses the number of Midi Clocks in a metronome click. The bb parameter expresses the number of notated 32nd-notes in a MIDI quarter- note (24 Midi Clocks). This was added because there are already multiple programs which allow the user to specify that what MIDI thinks of as a quarter-note (24 clocks) is to be notated as, or related to in terms of, something else.
Therefore, the complete event for 6/8 time, where the metronome clicks every three eighth-notes, but there are 24 clocks per quarter-note, 72 to the bar, would be:
255, 88, 4, 6, 3, 32, 8
That is, 6/8 time (8 is 2 to the 3rd power, so this is 06 03), 32 MIDI clocks per dotted-quarter, and eight notated 32nd-notes per MIDI quarter note.
255, 89, 2, sf, mi Key Signature

Figure 2.3, SF and the Key Signature
mi = 0: major key mi = 1: minor key
255, 127, len, data Sequencer-Specific Meta-Event
Special requirements for particular sequencers may use this event type: the first byte or bytes of data is a manufacturer ID. However, as this is an interchange format, growth of the specification proper is preferred to use of this event type. This type of event may be used by a sequencer which elects to use this as its only file format; sequencers with their established feature-specific formats should probably stick to the standard features when using this format.
[ Index |
Main Paragraph |
Previuos Paragraph ]