| 
   
    MIDI Control Surface library for Arduino 
   | 
 
 
 
 
Go to the documentation of this file.
    6 template <
class Derived>
 
    8                                 uint8_t d2, 
Cable cable) {
 
    9     sendOnCable(m, c, d1, d2, cable);
 
   12 template <
class Derived>
 
   15     sendOnCable(m, c, d1, cable);
 
   18 template <
class Derived>
 
   20                                        uint8_t d2, 
Cable cable) {
 
   21     uint8_t mm = 
static_cast<uint8_t
>(m);
 
   27     CRTP(Derived).sendImpl(mm | cc, d1, d2, cable.
getRaw());
 
   30 template <
class Derived>
 
   33     uint8_t mm = 
static_cast<uint8_t
>(m);
 
   41 template <
class Derived>
 
   43     uint8_t rr = 
static_cast<uint8_t
>(r);
 
   48 template <
class Derived>
 
   51         sendOnCable(MIDIMessageType::NOTE_ON, address.
getChannel(),
 
   54 template <
class Derived>
 
   57         sendOnCable(MIDIMessageType::NOTE_OFF, address.
getChannel(),
 
   60 template <
class Derived>
 
   63         sendOnCable(MIDIMessageType::KEY_PRESSURE, address.
getChannel(),
 
   66 template <
class Derived>
 
   72 template <
class Derived>
 
   75         sendOnCable(MIDIMessageType::PROGRAM_CHANGE, address.
getChannel(),
 
   78 template <
class Derived>
 
   81         sendOnCable(MIDIMessageType::PROGRAM_CHANGE, address.
getChannel(),
 
   84 template <
class Derived>
 
   87         sendOnCable(MIDIMessageType::CHANNEL_PRESSURE, address.
getChannel(),
 
   90 template <
class Derived>
 
   93         sendOnCable(MIDIMessageType::PITCH_BEND, address.
getChannel(),
 
   96 template <
class Derived>
 
  100             ERROR(
F(
"Error: invalid SysEx length"), 0x7F7F);
 
  106 template <
class Derived>
 
  111 template <
class Derived>
 
  116 template <
class Derived>
 
  
A type-safe class for MIDI channels.
 
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
 
constexpr Cable getCableNumber() const
Get the cable number [CABLE_1, CABLE_16].
 
A type-safe class for MIDI USB Cable numbers.
 
constexpr Cable getCableNumber() const
Get the cable number [CABLE_1, CABLE_16].
 
uint8_t CN
USB MIDI cable number;.
 
void sendNoteOn(MIDIAddress address, uint8_t velocity)
Send a MIDI Note On event.
 
void sendKP(MIDIAddress address, uint8_t pressure)
Send a MIDI Key Pressure event.
 
A class for saving a MIDI channel and cable number.
 
#define BEGIN_CS_NAMESPACE
 
uint8_t header
MIDI status byte (message type and channel).
 
uint8_t data2
First MIDI data byte.
 
void sendOnCable(MIDIMessageType m, Channel c, uint8_t d1, uint8_t d2, Cable cable)
Send a 3-byte MIDI packet with cable number.
 
bool hasTwoDataBytes() const
Check whether this message has one or two data bytes.
 
constexpr Channel getChannel() const
Get the channel [1, 16].
 
void sendPC(MIDIAddress address)
Send a MIDI Program Change event.
 
#define ERROR(msg, errc)
Print the error message and error code, and stop the execution if FATAL_ERRORS are enabled.
 
void send(MIDIMessageType m, Channel c, uint8_t d1, uint8_t d2, Cable cable=CABLE_1)
Send a 3-byte MIDI packet.
 
#define CRTP(Derived)
Helper for the Curiously Recurring Template Pattern.
 
uint8_t data1
First MIDI data byte.
 
void sendCC(MIDIAddress address, uint8_t value)
Send a MIDI Control Change event.
 
void sendPB(MIDIChannelCN address, uint16_t value)
Send a MIDI Pitch Bend event.
 
constexpr uint8_t getAddress() const
Get the address [0, 127].
 
constexpr Channel getChannel() const
Get the channel [CHANNEL_1, CHANNEL_16].
 
void sendNoteOff(MIDIAddress address, uint8_t velocity)
Send a MIDI Note Off event.
 
constexpr uint8_t getRaw() const
Get the channel as an integer.
 
constexpr uint8_t getRaw() const
Get the cable as an integer.
 
void sendCP(MIDIChannelCN address, uint8_t pressure)
Send a MIDI Channel Pressure event.