Control Surface  1.2.0
MIDI Control Surface library for Arduino
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
MIDIChannelCN Class Reference

A class for saving a MIDI channel and cable number. More...

#include <Def/MIDIAddress.hpp>

+ Collaboration diagram for MIDIChannelCN:

Public Member Functions

constexpr MIDIChannelCN ()
 
constexpr MIDIChannelCN (Channel channel, Cable cableNumber=CABLE_1)
 
constexpr Channel getChannel () const
 Get the channel [1, 16]. More...
 
constexpr uint8_t getRawChannel () const
 Get the channel as an integer [0, 15]. More...
 
constexpr Cable getCableNumber () const
 Get the cable number [CABLE_1, CABLE_16]. More...
 
constexpr uint8_t getRawCableNumber () const
 Get the cable number as an integer [0, 15]. More...
 
constexpr bool isValid () const
 Check if the MIDI address is valid. More...
 
constexpr operator bool () const
 Check if the MIDI address is valid. More...
 

Static Public Member Functions

constexpr static MIDIChannelCN invalid ()
 

Private Attributes

RawMIDIAddress addresses
 

Detailed Description

A class for saving a MIDI channel and cable number.

Definition at line 19 of file MIDIAddress.hpp.

Constructor & Destructor Documentation

◆ MIDIChannelCN() [1/2]

constexpr MIDIChannelCN ( )
inlineconstexpr

Definition at line 23 of file MIDIAddress.hpp.

◆ MIDIChannelCN() [2/2]

constexpr MIDIChannelCN ( Channel  channel,
Cable  cableNumber = CABLE_1 
)
inlineconstexpr

Definition at line 24 of file MIDIAddress.hpp.

Member Function Documentation

◆ getChannel()

constexpr Channel getChannel ( ) const
inlineconstexpr

Get the channel [1, 16].

Definition at line 33 of file MIDIAddress.hpp.

◆ getRawChannel()

constexpr uint8_t getRawChannel ( ) const
inlineconstexpr

Get the channel as an integer [0, 15].

Definition at line 35 of file MIDIAddress.hpp.

◆ getCableNumber()

constexpr Cable getCableNumber ( ) const
inlineconstexpr

Get the cable number [CABLE_1, CABLE_16].

Definition at line 38 of file MIDIAddress.hpp.

◆ getRawCableNumber()

constexpr uint8_t getRawCableNumber ( ) const
inlineconstexpr

Get the cable number as an integer [0, 15].

Definition at line 42 of file MIDIAddress.hpp.

◆ isValid()

constexpr bool isValid ( ) const
inlineconstexpr

Check if the MIDI address is valid.

Definition at line 47 of file MIDIAddress.hpp.

◆ operator bool()

constexpr operator bool ( ) const
inlineexplicitconstexpr

Check if the MIDI address is valid.

See also
isValid

Definition at line 51 of file MIDIAddress.hpp.

◆ invalid()

constexpr static MIDIChannelCN invalid ( )
inlinestaticconstexpr
Examples
One-Pot-Both-PB-and-CC.ino.

Definition at line 53 of file MIDIAddress.hpp.

Member Data Documentation

◆ addresses

RawMIDIAddress addresses
private

Definition at line 56 of file MIDIAddress.hpp.


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