mididi.def

mididi.def contains definition enums and types important to MIDI files.

The implementation (and some of the documentation) is based on this specification: https://www.cs.cmu.edu/~music/cmsip/readings/Standard-MIDI-file-format-updated.pdf

Members

Enums

ChannelMessageType
enum ChannelMessageType

ChannelMessageType enumerates the possible types of channel messages.

MetaEventType
enum MetaEventType

MetaEventType enumerates the possible meta event types.

SystemMessageType
enum SystemMessageType

SystemMessageType enumerates the possible types of system message. Some of these are system common messages, others are system realtime messages.

TrackFormat
enum TrackFormat

TrackFormat is the MIDI data's format.

Functions

getDataLength
size_t getDataLength(ubyte statusByte)
isChannelMessage
bool isChannelMessage(ubyte statusByte)

isChannelMessage() and isSystemMessage() are used to find if a MIDI event is a channel message or a system message.

isChannelModeMessage
bool isChannelModeMessage(ubyte statusByte, ubyte[2] dataBytes)
isChannelVoiceMessage
bool isChannelVoiceMessage(ubyte statusByte, ubyte[2] dataBytes)

ChannelMessageType enumerates the possible types of channel messages.

isMIDIEvent
bool isMIDIEvent(ubyte statusByte)
isMetaEvent
bool isMetaEvent(ubyte statusByte)
isSysExEvent
bool isSysExEvent(ubyte statusByte)

A track event is one of the following: - a MIDI event, meaning it carries around any message (channel or system), except system exclusive messages; - a system exclusive event, which offers an escape to transmit arbitrary bytes; - a meta event, meaning it carries around other meta information.

isSystemCommonMessage
bool isSystemCommonMessage(SystemMessageType type)
bool isSystemCommonMessage(ubyte statusByte)

SystemMessageType enumerates the possible types of system message. Some of these are system common messages, others are system realtime messages.

isSystemMessage
bool isSystemMessage(ubyte statusByte)

isChannelMessage() and isSystemMessage() are used to find if a MIDI event is a channel message or a system message.

isSystemRealTimeMessage
bool isSystemRealTimeMessage(SystemMessageType type)
bool isSystemRealTimeMessage(ubyte statusByte)

SystemMessageType enumerates the possible types of system message. Some of these are system common messages, others are system realtime messages.

Meta