pub enum MetaEvent<'src> {
Show 19 variants
SequenceNumber(u16),
Text(&'src [u8]),
Copyright(&'src [u8]),
SequenceOrTrackName(&'src [u8]),
InstrumentName(&'src [u8]),
Lyric(&'src [u8]),
Marker(&'src [u8]),
CuePoint(&'src [u8]),
ProgramName(&'src [u8]),
DeviceName(&'src [u8]),
MidiChannelPrefix(u8),
MidiPort(u8),
EndOfTrack,
Tempo(u32),
SMPTEOffset(SMPTEOffset),
TimeSignature(TimeSignature),
KeySignature(KeySignature),
SequencerSpecificEvent(&'src [u8]),
Unknown(u8, &'src [u8]),
}
Expand description
A special non-MIDI event
Variants§
SequenceNumber(u16)
The sequence number (as would be used in a MIDI Cue message)
Text(&'src [u8])
Free text, can include comments and other useful information, if that information doesn’t naturally fit in another text-based field
Copyright(&'src [u8])
A copyright notice
SequenceOrTrackName(&'src [u8])
The name of the current sequence or track (depending on context)
InstrumentName(&'src [u8])
The name of the current track The name of the instrument for this track (e.g. “Flute”, “Piano”, “Tenor”, etc.)
Lyric(&'src [u8])
A syllable or set of syllables to be sung as part of a vocal track.
Marker(&'src [u8])
A useful position-dependent note in the music (e.g. rehersal mark “A”, loop point, section name)
CuePoint(&'src [u8])
A marker to indicate this event should be synchronized with some non-midi event, e.g. “car crash on screen”, “actors leave stage”, etc.
ProgramName(&'src [u8])
Indicates what patch or program name should be used by the immediately subsequent Bank Select and Program Change messages.
DeviceName(&'src [u8])
The name of the hardware device used to produce sounds for this track. Might be inserted for example if using a branded synth or keyboard to generate midi events.
MidiChannelPrefix(u8)
Indicate which channel subsequent SysEx and Meta events apply to. Lasts until the next event of this type, or a normal MIDI event
MidiPort(u8)
Specify which port future MIDI event apply to. This exists to increase the 4-bit channel limit, and so it’s functionality overlaps with channels
EndOfTrack
This event must be at the end of each track, and must not be anywhere else
Tempo(u32)
Specifies the number of microseconds per quarter note for future MIDI events.
SMPTEOffset(SMPTEOffset)
This is complicated and I don’t understand it.
TimeSignature(TimeSignature)
Set the time signature. If no time signature event occurs before a MIDI event the default
is (4, 4)
KeySignature(KeySignature)
Set the key signature. The default is C major.
SequencerSpecificEvent(&'src [u8])
Vendor specific events. I don’t try to parse them - just return the data
Unknown(u8, &'src [u8])
An unrecognised event. To be future-compatible, just ignore these