A MIDI message container.
More...
#include <MIDIMessage.h>
|
| static MIDIMessage | NoteOff (int key, int velocity=127, int channel=0) |
| | Create a NoteOff message.
|
| |
| static MIDIMessage | NoteOn (int key, int velocity=127, int channel=0) |
| | Create a NoteOn message.
|
| |
| static MIDIMessage | PolyphonicAftertouch (int key, int pressure, int channel=0) |
| | Create a PolyPhonic Aftertouch message.
|
| |
| static MIDIMessage | ControlChange (int control, int value, int channel=0) |
| | Create a Control Change message.
|
| |
| static MIDIMessage | ProgramChange (int program, int channel=0) |
| | Create a Program Change message.
|
| |
| static MIDIMessage | ChannelAftertouch (int pressure, int channel=0) |
| | Create a Channel Aftertouch message.
|
| |
| static MIDIMessage | PitchWheel (int pitch=0, int channel=0) |
| | Create a Pitch Wheel message.
|
| |
| static MIDIMessage | AllNotesOff (int channel=0) |
| | Create an All Notes Off message.
|
| |
| static MIDIMessage | SysEx (uint8_t *data, int len) |
| | Create a SysEx message.
|
| |
A MIDI message container.
Definition at line 51 of file MIDIMessage.h.
◆ MIDIMessageType
◆ MIDIMessage()
◆ operator=()
◆ from_raw()
| void from_raw |
( |
uint8_t * |
buf, |
|
|
int |
buf_len |
|
) |
| |
Set this MIDIMessage to a raw MIDI message.
- Parameters
-
| buf | is a true MIDI message (not USBMidi message) |
| buf_len | size of message |
Definition at line 95 of file MIDIMessage.h.
◆ NoteOff()
| static MIDIMessage NoteOff |
( |
int |
key, |
|
|
int |
velocity = 127, |
|
|
int |
channel = 0 |
|
) |
| |
|
static |
Create a NoteOff message.
- Parameters
-
| key | Key ID |
| velocity | Key velocity (0-127, default = 127) |
| channel | Key channel (0-15, default 0) |
- Returns
- A MIDIMessage
Definition at line 120 of file MIDIMessage.h.
◆ NoteOn()
| static MIDIMessage NoteOn |
( |
int |
key, |
|
|
int |
velocity = 127, |
|
|
int |
channel = 0 |
|
) |
| |
|
static |
Create a NoteOn message.
- Parameters
-
| key | Key ID |
| velocity | Key velocity (0-127, default = 127) |
| channel | Key channel (0-15, default 0) |
- Returns
- A MIDIMessage
Definition at line 137 of file MIDIMessage.h.
◆ PolyphonicAftertouch()
| static MIDIMessage PolyphonicAftertouch |
( |
int |
key, |
|
|
int |
pressure, |
|
|
int |
channel = 0 |
|
) |
| |
|
static |
Create a PolyPhonic Aftertouch message.
- Parameters
-
| key | Key ID |
| pressure | Aftertouch pressure (0-127) |
| channel | Key channel (0-15, default 0) |
- Returns
- A MIDIMessage
Definition at line 154 of file MIDIMessage.h.
◆ ControlChange()
| static MIDIMessage ControlChange |
( |
int |
control, |
|
|
int |
value, |
|
|
int |
channel = 0 |
|
) |
| |
|
static |
Create a Control Change message.
- Parameters
-
| control | Controller ID |
| value | Controller value (0-127) |
| channel | Controller channel (0-15, default 0) |
- Returns
- A MIDIMessage
Definition at line 171 of file MIDIMessage.h.
◆ ProgramChange()
| static MIDIMessage ProgramChange |
( |
int |
program, |
|
|
int |
channel = 0 |
|
) |
| |
|
static |
Create a Program Change message.
- Parameters
-
| program | Program ID |
| channel | Channel (0-15, default 0) |
- Returns
- A MIDIMessage
Definition at line 187 of file MIDIMessage.h.
◆ ChannelAftertouch()
| static MIDIMessage ChannelAftertouch |
( |
int |
pressure, |
|
|
int |
channel = 0 |
|
) |
| |
|
static |
Create a Channel Aftertouch message.
- Parameters
-
| pressure | Pressure |
| channel | Key channel (0-15, default 0) |
- Returns
- A MIDIMessage
Definition at line 203 of file MIDIMessage.h.
◆ PitchWheel()
| static MIDIMessage PitchWheel |
( |
int |
pitch = 0, |
|
|
int |
channel = 0 |
|
) |
| |
|
static |
Create a Pitch Wheel message.
- Parameters
-
| pitch | Pitch (-8192 - 8191, default = 0) |
| channel | Channel (0-15, default 0) |
- Returns
- A MIDIMessage
Definition at line 219 of file MIDIMessage.h.
◆ AllNotesOff()
Create an All Notes Off message.
- Parameters
-
| channel | Channel (0-15, default 0) |
- Returns
- A MIDIMessage
Definition at line 235 of file MIDIMessage.h.
◆ SysEx()
Create a SysEx message.
- Parameters
-
| data | SysEx data (including 0xF0 .. 0xF7) |
| len | SysEx data length |
- Returns
- A MIDIMessage
Definition at line 245 of file MIDIMessage.h.
◆ type()
Read the message type.
- Returns
- MIDIMessageType
Definition at line 273 of file MIDIMessage.h.
◆ channel()
Read the channel number.
- Returns
- channel number or -1 on error
Definition at line 355 of file MIDIMessage.h.
◆ key()
Read the key ID.
- Returns
- key ID or -1 on error
Definition at line 365 of file MIDIMessage.h.
◆ velocity()
Read the velocity.
- Returns
- velocity or -1 on error
Definition at line 382 of file MIDIMessage.h.
◆ value()
Read the controller value.
- Returns
- controller value or -1 on error
Definition at line 398 of file MIDIMessage.h.
◆ pressure()
Read the aftertouch pressure.
- Returns
- aftertouch pressure or -1 on error
Definition at line 415 of file MIDIMessage.h.
◆ controller()
Read the controller number.
- Returns
- controller number or -1 on error
Definition at line 435 of file MIDIMessage.h.
◆ program()
Read the program number.
- Returns
- program number or -1 on error
Definition at line 452 of file MIDIMessage.h.
◆ pitch()
Read the pitch value.
- Returns
- pitch value or -1 on error
Definition at line 467 of file MIDIMessage.h.