Control Surface  1.2.0
MIDI Control Surface library for Arduino
List of all members
MIDI_Sender< Derived > Class Template Reference

Statically polymorphic template for classes that send MIDI messages. More...

#include <MIDI_Interfaces/MIDI_Interface.hpp>

+ Collaboration diagram for MIDI_Sender< Derived >:

Sending MIDI

void send (MIDIMessageType m, Channel c, uint8_t d1, uint8_t d2, Cable cable=CABLE_1)
 Send a 3-byte MIDI packet. More...
 
void send (MIDIMessageType m, Channel c, uint8_t d1, Cable cable=CABLE_1)
 Send a 2-byte MIDI packet. More...
 
void sendOnCable (MIDIMessageType m, Channel c, uint8_t d1, uint8_t d2, Cable cable)
 Send a 3-byte MIDI packet with cable number. More...
 
void sendOnCable (MIDIMessageType m, Channel c, uint8_t d1, Cable cable)
 Send a 2-byte MIDI packet with cable number. More...
 
void sendOnCable (MIDIMessageType rt, Cable cable)
 Send a single-byte MIDI packet with cable number. More...
 
void sendNoteOn (MIDIAddress address, uint8_t velocity)
 Send a MIDI Note On event. More...
 
void sendNoteOff (MIDIAddress address, uint8_t velocity)
 Send a MIDI Note Off event. More...
 
void sendKP (MIDIAddress address, uint8_t pressure)
 Send a MIDI Key Pressure event. More...
 
void sendCC (MIDIAddress address, uint8_t value)
 Send a MIDI Control Change event. More...
 
void sendPC (MIDIAddress address)
 Send a MIDI Program Change event. More...
 
void sendPC (MIDIChannelCN address, uint8_t value)
 Send a MIDI Program Change event. More...
 
void sendCP (MIDIChannelCN address, uint8_t pressure)
 Send a MIDI Channel Pressure event. More...
 
void sendPB (MIDIChannelCN address, uint16_t value)
 Send a MIDI Pitch Bend event. More...
 
void send (ChannelMessage message)
 Send a MIDI Channel Message. More...
 
void send (SysExMessage message)
 Send a MIDI System Exclusive message. More...
 
template<size_t N>
void send (const uint8_t(&sysexdata)[N], Cable cable=CABLE_1)
 Send a MIDI System Exclusive message. More...
 
void send (RealTimeMessage message)
 Send a MIDI Real-Time message. More...
 
void send (MIDIMessageType rt, Cable cable=CABLE_1)
 Send a single-byte MIDI message. More...
 

Detailed Description

template<class Derived>
class MIDI_Sender< Derived >

Statically polymorphic template for classes that send MIDI messages.

Definition at line 19 of file MIDI_Interface.hpp.

Member Function Documentation

◆ send() [1/7]

void send ( MIDIMessageType  m,
Channel  c,
uint8_t  d1,
uint8_t  d2,
Cable  cable = CABLE_1 
)

Send a 3-byte MIDI packet.

Parameters
mMIDI message type. [0x80, 0xE0]
cThe MIDI channel. [1, 16]
d1The first data byte. [0, 127]
d2The second data byte. [0, 127]
cableThe MIDI Cable Number. [1, 16]

Definition at line 7 of file MIDI_Interface.ipp.

◆ send() [2/7]

void send ( MIDIMessageType  m,
Channel  c,
uint8_t  d1,
Cable  cable = CABLE_1 
)

Send a 2-byte MIDI packet.

Parameters
mMIDI message type. [0x80, 0xE0]
cThe MIDI channel. [1, 16]
d1The first data byte. [0, 127]
cableThe MIDI Cable Number. [1, 16]

Definition at line 13 of file MIDI_Interface.ipp.

◆ sendOnCable() [1/3]

void sendOnCable ( MIDIMessageType  m,
Channel  c,
uint8_t  d1,
uint8_t  d2,
Cable  cable 
)

Send a 3-byte MIDI packet with cable number.

Parameters
mMIDI message type. [0x80, 0xE0]
cThe MIDI channel. [1, 16]
d1The first data byte. [0, 127]
d2The second data byte. [0, 127]
cableThe MIDI Cable Number. [1, 16]

Definition at line 19 of file MIDI_Interface.ipp.

◆ sendOnCable() [2/3]

void sendOnCable ( MIDIMessageType  m,
Channel  c,
uint8_t  d1,
Cable  cable 
)

Send a 2-byte MIDI packet with cable number.

Parameters
mMIDI message type. [0x80, 0xE0]
cThe MIDI channel. [1, 16]
d1The first data byte. [0, 127]
cableThe MIDI Cable Number. [1, 16]

Definition at line 31 of file MIDI_Interface.ipp.

◆ sendOnCable() [3/3]

void sendOnCable ( MIDIMessageType  rt,
Cable  cable 
)

Send a single-byte MIDI packet with cable number.

Parameters
rtThe MIDI byte to send.
cableThe MIDI Cable Number. [1, 16]

Definition at line 42 of file MIDI_Interface.ipp.

◆ sendNoteOn()

void sendNoteOn ( MIDIAddress  address,
uint8_t  velocity 
)

Send a MIDI Note On event.

Definition at line 49 of file MIDI_Interface.ipp.

◆ sendNoteOff()

void sendNoteOff ( MIDIAddress  address,
uint8_t  velocity 
)

Send a MIDI Note Off event.

Definition at line 55 of file MIDI_Interface.ipp.

◆ sendKP()

void sendKP ( MIDIAddress  address,
uint8_t  pressure 
)

Send a MIDI Key Pressure event.

Definition at line 61 of file MIDI_Interface.ipp.

◆ sendCC()

void sendCC ( MIDIAddress  address,
uint8_t  value 
)

Send a MIDI Control Change event.

Definition at line 67 of file MIDI_Interface.ipp.

◆ sendPC() [1/2]

void sendPC ( MIDIAddress  address)

Send a MIDI Program Change event.

Definition at line 79 of file MIDI_Interface.ipp.

◆ sendPC() [2/2]

void sendPC ( MIDIChannelCN  address,
uint8_t  value 
)

Send a MIDI Program Change event.

Definition at line 73 of file MIDI_Interface.ipp.

◆ sendCP()

void sendCP ( MIDIChannelCN  address,
uint8_t  pressure 
)

Send a MIDI Channel Pressure event.

Definition at line 85 of file MIDI_Interface.ipp.

◆ sendPB()

void sendPB ( MIDIChannelCN  address,
uint16_t  value 
)

Send a MIDI Pitch Bend event.

Definition at line 91 of file MIDI_Interface.ipp.

◆ send() [3/7]

void send ( ChannelMessage  message)

Send a MIDI Channel Message.

Definition at line 117 of file MIDI_Interface.ipp.

◆ send() [4/7]

void send ( SysExMessage  message)

Send a MIDI System Exclusive message.

Definition at line 97 of file MIDI_Interface.ipp.

◆ send() [5/7]

void send ( const uint8_t(&)  sysexdata[N],
Cable  cable = CABLE_1 
)
inline

Send a MIDI System Exclusive message.

Definition at line 118 of file MIDI_Interface.hpp.

◆ send() [6/7]

void send ( RealTimeMessage  message)

Send a MIDI Real-Time message.

Definition at line 112 of file MIDI_Interface.ipp.

◆ send() [7/7]

void send ( MIDIMessageType  rt,
Cable  cable = CABLE_1 
)

Send a single-byte MIDI message.

Definition at line 107 of file MIDI_Interface.ipp.


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