Control Surface new-input
MIDI Control Surface library for Arduino
Private Attributes | List of all members
MIDIChannelCable Class Reference

#include <Def/MIDIAddress.hpp>

Detailed Description

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.

+ Collaboration diagram for MIDIChannelCable:

Constructors

constexpr MIDIChannelCable ()
 
constexpr MIDIChannelCable (Channel channel, Cable cableNumber=CABLE_1)
 
constexpr static 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. More...
 
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. More...
 
constexpr bool isValid () const
 Check if the MIDI address is valid.
 
constexpr operator bool () const
 Check if the MIDI address is valid. More...
 

Base functions for address pattern matching.

static bool matchSingle (MIDIChannelCable toMatch, MIDIChannelCable base)
 Check if two addresses match (are equal).
 

Private Attributes

RawMIDIAddress addresses
 

Member Function Documentation

◆ operator==()

constexpr bool operator== ( MIDIChannelCable  rhs) const
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.

Note
Invalid addresses are not equal nor inequal.

Definition at line 67 of file MIDIAddress.hpp.

◆ operator!=()

constexpr bool operator!= ( MIDIChannelCable  rhs) const
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.

Note
Invalid addresses are not equal nor inequal.

Definition at line 77 of file MIDIAddress.hpp.

◆ operator bool()

constexpr operator bool ( ) const
inlineexplicitconstexpr

Check if the MIDI address is valid.

See also
isValid

Definition at line 88 of file MIDIAddress.hpp.


The documentation for this class was generated from the following file: