|
|
The MidiCommand describes one complete MIDI message, including status byte and any data associated with it.
This is a value type.
See also: MidiEvent
MidiCommand (int status, int channel, int port,
int data1, int data2)
| MidiCommand |
Construct a MidiCommmand with two data bytes
Parameters:
status | Status value (4 bits). |
channel | Channel value (0-15). |
port | Port value. |
data1 | First data byte value (0-127). |
data2 | Second data byte value (0-127). |
MidiCommand (int status, int channel, int port,
int data1)
| MidiCommand |
Construct a MidiCommmand with one data byte
Parameters:
status | Status value (4 bits). |
channel | Channel value (0-15). |
port | Port value. |
data1 | Data byte value (0-127). |
MidiCommand ()
| MidiCommand |
Construct a MidiCommand with status MidiCommand_Invalid.
int noDataBytes ()
| noDataBytes |
[const]
Returns the number of data bytes this type of MidiCommand has.
Returns: The value 1 or 2
bool isChannel ()
| isChannel |
[const]
Returns whether this is a 'channel' MIDI command or not
Returns: Whether this is a 'channel' MIDI command
bool isNote ()
| isNote |
[const]
Returns whether the data1 value is defined to be a note number.
Returns: Whether data1 contains a note value
int port | port |
unsigned status | status |
signed channel | channel |
unsigned data1 | data1 |
unsigned data2 | data2 |
unsigned selected | selected |
enum MagicPortNumbers { NoPort = -1, AllPorts = -2, SamePort = -3 } | MagicPortNumbers |
These are some "reserved" port numbers. Valid port numbers are positive integers. Negative integers have specific meanings.
enum MagicChannelNumbers { NoChannel = -1, AllChannels = -2, SameChannel = -3 } | MagicChannelNumbers |
These are some "reserved" channel numbers. Valid channel numbers are 0-15. Negative integers have specific meanings.
int operator== (const MidiCommand &c)
| operator== |
[const]
MidiCommands are considered equal if all data members except selected match.