#include <Midi.h>
Public Types | |
enum | MagicPortNumbers { NoPort = -1, AllPorts = -2, SamePort = -3 } |
enum | MagicChannelNumbers { NoChannel = -1, AllChannels = -2, SameChannel = -3 } |
Public Member Functions | |
MidiCommand (int status, int channel, int port, int data1, int data2) | |
MidiCommand (int status, int channel, int port, int data1) | |
MidiCommand () | |
int | noDataBytes () const |
bool | isChannel () const |
bool | isNote () const |
int | operator== (const MidiCommand &c) const |
Public Attributes | |
int | port |
unsigned | status: 4 |
signed | channel: 5 |
unsigned | data1: 8 |
unsigned | data2: 8 |
unsigned | selected: 1 |
The MidiCommand describes one complete MIDI message, including status byte and any data associated with it.
This is a value type.
|
These are some "reserved" port numbers. Valid port numbers are positive integers. Negative integers have specific meanings. |
|
These are some "reserved" channel numbers. Valid channel numbers are 0-15. Negative integers have specific meanings. |
|
Construct a MidiCommmand with two data bytes
|
|
Construct a MidiCommmand with one data byte
|
|
Construct a MidiCommand with status MidiCommand_Invalid. |
|
Returns the number of data bytes this type of MidiCommand has.
|
|
Returns whether this is a 'channel' MIDI command or not
|
|
Returns whether the data1 value is defined to be a note number.
|
|
MidiCommands are considered equal if all data members except selected match. |
|
The port value. Valid port numbers are positive integers. There are some defined minus numbers that have special meanings, too. |
|
The status (type of MIDI message identifier) value (4 bits). |
|
The channel value (0-15, with some magic minus numbers). |
|
The data1 value (0-127). |
|
The data2 value (0-127). |
|
Whether this command is 'selected' or not (0/1). This may be used by some sort of Phrase editor.
|