MidiMessage

This abstraction is similar to the one in IPlug. For VST raw MIDI messages are passed. For AU MIDI messages gets synthesized.

Constructors

this
this(int offset, ubyte statusByte, ubyte data1, ubyte data2)
Undocumented in source.

Members

Aliases

isPitchWheel
alias isPitchWheel = isPitchBend
Undocumented in source.
pitchWheel
alias pitchWheel = pitchBend
Undocumented in source.

Functions

channel
int channel()

Midi channels 1 .. 16

channelAftertouch
int channelAftertouch()

Channel pressure

controlChangeControl
MidiControlChange controlChangeControl()

Number of the changed controller

controlChangeOnOff
bool controlChangeOnOff()
controlChangeValue
int controlChangeValue()

Controller's new value

controlChangeValue0to1
float controlChangeValue0to1()

Controller's new value

data1
ubyte data1()
data2
ubyte data2()

Simply returns internal representation.

isAllNotesOff
bool isAllNotesOff()

DO HANDLE THIS. From MIDI Spec:

isAllSoundsOff
bool isAllSoundsOff()

DO HANDLE THIS. From MIDI Spec:

isChannelAftertouch
bool isChannelAftertouch()
Undocumented in source. Be warned that the author may not have intended to support it.
isControlChange
bool isControlChange()
Undocumented in source. Be warned that the author may not have intended to support it.
isNoteOff
bool isNoteOff()

Checks whether the status type of the message is 'Note Off' or 'Note On' with a velocity of 0.

isNoteOn
bool isNoteOn()

Checks whether the status type of the message is 'Note On' _and the velocity value is actually greater than zero_.

isPitchBend
bool isPitchBend()
Undocumented in source. Be warned that the author may not have intended to support it.
isPolyAftertouch
bool isPolyAftertouch()
Undocumented in source. Be warned that the author may not have intended to support it.
isProgramChange
bool isProgramChange()
Undocumented in source. Be warned that the author may not have intended to support it.
lengthInBytes
int lengthInBytes()

Return: size in bytes of the MIDI message, if it were serialized without offset. -1 if unknown size (either the status byte doesn't start with 1xxxxxx, or starts with 1111xxxx (can be many different things). Reference: https://www.midi.org/specifications-old/item/table-2-expanded-messages-list-status-bytes

noteNumber
int noteNumber()
Undocumented in source. Be warned that the author may not have intended to support it.
noteVelocity
int noteVelocity()
Undocumented in source. Be warned that the author may not have intended to support it.
offset
int offset()
Undocumented in source. Be warned that the author may not have intended to support it.
pitchBend
float pitchBend()
polyAftertouch
int polyAftertouch()

Amount of pressure

program
int program()

Program number

statusType
int statusType()

Status Type

toBytes
int toBytes(ubyte* data, int buflen)

Write the raw MIDI data in a buffer data of capacity len.

Meta