#include <MIDI_Parsers/MIDI_MessageTypes.hpp>
Definition at line 113 of file MIDI_MessageTypes.hpp.
Public Member Functions | |
MIDIMessage (uint8_t header, uint8_t data1, uint8_t data2, Cable cable=Cable_1) | |
Constructor. More... | |
MIDIMessage (MIDIMessageType header, uint8_t data1, uint8_t data2, Cable cable=Cable_1) | |
Constructor. More... | |
bool | operator== (MIDIMessage other) const |
Check for equality. More... | |
bool | operator!= (MIDIMessage other) const |
Check for inequality. More... | |
MIDIMessageType | getMessageType () const |
Get the MIDI message type. More... | |
void | setMessageType (MIDIMessageType type) |
Set the MIDI message type. More... | |
uint8_t | getData1 () const |
Get the first data byte. More... | |
uint8_t | getData2 () const |
Get the second data byte. More... | |
void | setData1 (uint8_t data) |
Set the first data byte. More... | |
void | setData2 (uint8_t data) |
Set the second data byte. More... | |
Cable | getCable () const |
Get the MIDI USB cable number of the message. More... | |
void | setCable (Cable cable) |
Set the MIDI USB cable number of the message. More... | |
bool | hasValidChannelMessageHeader () const |
Check whether the header is a valid header for a channel message. More... | |
bool | hasValidSystemCommonHeader () const |
Check whether the header is a valid header for a System Common message. More... | |
uint16_t | getData14bit () const |
If Data 1 and Data 2 represent a single 14-bit number, you can use this method to retrieve that number. More... | |
void | setData14bit (uint16_t data) |
If Data 1 and Data 2 represent a single 14-bit number, you can use this method to set that number. More... | |
void | sanitize () |
Make sure that the status byte has the most significant bit set and the data bytes have the most significant bits cleared. More... | |
Public Attributes | |
uint8_t | header |
MIDI status byte (message type and channel). More... | |
uint8_t | data1 |
First MIDI data byte. More... | |
uint8_t | data2 |
First MIDI data byte. More... | |
Cable | cable |
USB MIDI cable number;. More... | |
|
inline |
Constructor.
Definition at line 115 of file MIDI_MessageTypes.hpp.
|
inline |
Constructor.
Definition at line 120 of file MIDI_MessageTypes.hpp.
|
inline |
Check for equality.
Definition at line 131 of file MIDI_MessageTypes.hpp.
|
inline |
Check for inequality.
Definition at line 136 of file MIDI_MessageTypes.hpp.
|
inline |
Get the MIDI message type.
Definition at line 139 of file MIDI_MessageTypes.hpp.
|
inline |
Set the MIDI message type.
Definition at line 149 of file MIDI_MessageTypes.hpp.
|
inline |
Get the first data byte.
Definition at line 154 of file MIDI_MessageTypes.hpp.
|
inline |
Get the second data byte.
Definition at line 156 of file MIDI_MessageTypes.hpp.
|
inline |
Set the first data byte.
Definition at line 158 of file MIDI_MessageTypes.hpp.
|
inline |
Set the second data byte.
Definition at line 160 of file MIDI_MessageTypes.hpp.
|
inline |
Get the MIDI USB cable number of the message.
Definition at line 163 of file MIDI_MessageTypes.hpp.
|
inline |
Set the MIDI USB cable number of the message.
Definition at line 165 of file MIDI_MessageTypes.hpp.
|
inline |
Check whether the header is a valid header for a channel message.
Definition at line 168 of file MIDI_MessageTypes.hpp.
|
inline |
Check whether the header is a valid header for a System Common message.
Definition at line 178 of file MIDI_MessageTypes.hpp.
|
inline |
If Data 1 and Data 2 represent a single 14-bit number, you can use this method to retrieve that number.
Definition at line 184 of file MIDI_MessageTypes.hpp.
|
inline |
If Data 1 and Data 2 represent a single 14-bit number, you can use this method to set that number.
Definition at line 189 of file MIDI_MessageTypes.hpp.
|
inline |
Make sure that the status byte has the most significant bit set and the data bytes have the most significant bits cleared.
Definition at line 196 of file MIDI_MessageTypes.hpp.
uint8_t header |
MIDI status byte (message type and channel).
Definition at line 124 of file MIDI_MessageTypes.hpp.
uint8_t data1 |
First MIDI data byte.
Definition at line 125 of file MIDI_MessageTypes.hpp.
uint8_t data2 |
First MIDI data byte.
Definition at line 126 of file MIDI_MessageTypes.hpp.
Cable cable |
USB MIDI cable number;.
Definition at line 128 of file MIDI_MessageTypes.hpp.