#include <Def/MIDIAddress.hpp>
A class for saving a MIDI channel and cable number.
A MIDI channel and cable number can be marked "invalid". The MIDI sending functions (MIDI_Sender) will never send messages addressed to invalid channels or cables.
Definition at line 24 of file MIDIAddress.hpp.
Constructors | |
constexpr | MIDIChannelCable () |
constexpr | MIDIChannelCable (Channel channel, Cable cableNumber=Cable_1) |
static constexpr MIDIChannelCable | invalid () |
Member access | |
constexpr Channel | getChannel () const |
Get the channel [1, 16]. | |
constexpr uint8_t | getRawChannel () const |
Get the channel as an integer [0, 15]. | |
constexpr Cable | getCableNumber () const |
Get the cable number [Cable_1, Cable_16]. | |
constexpr uint8_t | getRawCableNumber () const |
Get the cable number as an integer [0, 15]. | |
Checks | |
constexpr bool | operator== (MIDIChannelCable rhs) const |
Check for equality: two addresses are equal if and only if they are both valid addresses and the MIDI channel and MIDI USB cable number are equal. | |
constexpr bool | operator!= (MIDIChannelCable rhs) const |
Check for inequality: two addresses are not equal if and only if they are both valid addresses and have a MIDI channel or MIDI USB cable number that differs. | |
constexpr bool | isValid () const |
Check if the MIDI address is valid. | |
constexpr | operator bool () const |
Check if the MIDI address is valid. | |
Base functions for address pattern matching. | |
static bool | matchSingle (MIDIChannelCable toMatch, MIDIChannelCable base) |
Check if two addresses match (are equal). | |
Protected Member Functions | |
constexpr | MIDIChannelCable (RawMIDIAddress addresses) |
Private Attributes | |
RawMIDIAddress | addresses |
|
inlineconstexpr |
Definition at line 31 of file MIDIAddress.hpp.
|
inlineconstexpr |
Definition at line 32 of file MIDIAddress.hpp.
|
inlineconstexprprotected |
Definition at line 104 of file MIDIAddress.hpp.
|
inlinestaticconstexpr |
Definition at line 35 of file MIDIAddress.hpp.
|
inlineconstexpr |
Get the channel [1, 16].
Definition at line 44 of file MIDIAddress.hpp.
|
inlineconstexpr |
Get the channel as an integer [0, 15].
Definition at line 46 of file MIDIAddress.hpp.
|
inlineconstexpr |
Get the cable number [Cable_1, Cable_16].
Definition at line 49 of file MIDIAddress.hpp.
|
inlineconstexpr |
Get the cable number as an integer [0, 15].
Definition at line 53 of file MIDIAddress.hpp.
|
inlineconstexpr |
Check for equality: two addresses are equal if and only if they are both valid addresses and the MIDI channel and MIDI USB cable number are equal.
Definition at line 67 of file MIDIAddress.hpp.
|
inlineconstexpr |
Check for inequality: two addresses are not equal if and only if they are both valid addresses and have a MIDI channel or MIDI USB cable number that differs.
Definition at line 77 of file MIDIAddress.hpp.
|
inlineconstexpr |
Check if the MIDI address is valid.
Definition at line 84 of file MIDIAddress.hpp.
|
inlineexplicitconstexpr |
|
inlinestatic |
Check if two addresses match (are equal).
Definition at line 97 of file MIDIAddress.hpp.
|
private |
Definition at line 108 of file MIDIAddress.hpp.