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

#include <MIDI_Interfaces/MIDI_Sender.hpp>

Detailed Description

template<class Derived>
class MIDI_Sender< Derived >

Statically polymorphic template for classes that send MIDI messages.

Definition at line 11 of file MIDI_Sender.hpp.

+ Collaboration diagram for MIDI_Sender< Derived >:

Sending MIDI Channel Voice messages

void send (ChannelMessage message)
 Send a MIDI Channel Voice message. More...
 
void sendChannelMessage (MIDIMessageType m, Channel c, uint8_t d1, uint8_t d2, Cable cable=CABLE_1)
 Send a 3-byte MIDI Channel Voice message. More...
 
void sendChannelMessage (MIDIMessageType m, Channel c, uint8_t d1, Cable cable=CABLE_1)
 Send a 2-byte MIDI Channel Voice message. 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 sendKeyPressure (MIDIAddress address, uint8_t pressure)
 Send a MIDI Key Pressure event. More...
 
void sendControlChange (MIDIAddress address, uint8_t value)
 Send a MIDI Control Change event. More...
 
void sendProgramChange (MIDIAddress address)
 Send a MIDI Program Change event. More...
 
void sendProgramChange (MIDIChannelCable address, uint8_t value)
 Send a MIDI Program Change event. More...
 
void sendChannelPressure (MIDIChannelCable address, uint8_t pressure)
 Send a MIDI Channel Pressure event. More...
 
void sendPitchBend (MIDIChannelCable address, uint16_t value)
 Send a MIDI Pitch Bend event. More...
 

Sending MIDI System Common messages

void send (SysCommonMessage message)
 Send a MIDI System Common message. More...
 
void sendSysCommon (MIDIMessageType m, Cable cable=CABLE_1)
 Send a MIDI System Common message. More...
 
void sendSysCommon (MIDIMessageType m, uint8_t data1, Cable cable=CABLE_1)
 Send a MIDI System Common message. More...
 
void sendSysCommon (MIDIMessageType m, uint8_t data1, uint8_t data2, Cable cable=CABLE_1)
 Send a MIDI System Common message. More...
 
void sendMTCQuarterFrame (uint8_t data, Cable cable=CABLE_1)
 Send a MIDI Time Code Quarter Frame. More...
 
void sendMTCQuarterFrame (uint8_t messageType, uint8_t values, Cable cable=CABLE_1)
 Send a MIDI Time Code Quarter Frame. More...
 
void sendSongPositionPointer (uint16_t spp, Cable cable=CABLE_1)
 Send a MIDI Song Position Pointer message. More...
 
void sendSongSelect (uint8_t song, Cable cable=CABLE_1)
 Send a MIDI Song Select message. More...
 
void sendTuneRequest (Cable cable=CABLE_1)
 Send a MIDI Tune Request. More...
 

Sending MIDI System Exclusive messages

void send (SysExMessage message)
 Send a MIDI System Exclusive message. More...
 
template<uint16_t N>
void sendSysEx (const uint8_t(&sysexdata)[N], Cable cable=CABLE_1)
 Send a MIDI System Exclusive message. More...
 
void sendSysEx (const uint8_t *data, uint16_t length, Cable cable=CABLE_1)
 Send a MIDI System Exclusive message. More...
 

Sending MIDI Real-Time messages

void send (RealTimeMessage message)
 Send a MIDI Real-Time message. More...
 
void sendRealTime (MIDIMessageType rt, Cable cable=CABLE_1)
 Send a MIDI Real-Time message. More...
 
void sendRealTime (uint8_t rt, Cable cable=CABLE_1)
 Send a MIDI Real-Time message. More...
 
void sendTimingClock (Cable cable=CABLE_1)
 Send a MIDI Timing Clock message. More...
 
void sendStart (Cable cable=CABLE_1)
 Send a MIDI Start message. More...
 
void sendContinue (Cable cable=CABLE_1)
 Send a MIDI Continue message. More...
 
void sendStop (Cable cable=CABLE_1)
 Send a MIDI Stop message. More...
 
void sendActiveSensing (Cable cable=CABLE_1)
 Send a MIDI Active Sensing message. More...
 
void sendSystemReset (Cable cable=CABLE_1)
 Send a MIDI System Reset message. More...
 

Flusing the MIDI send buffer

void sendNow ()
 Causes all buffered messages to be sent immediately. More...
 

Deprecated

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 (MIDIChannelCable address, uint8_t value)
 Send a MIDI Program Change event. More...
 
void sendCP (MIDIChannelCable address, uint8_t pressure)
 Send a MIDI Channel Pressure event. More...
 
void sendPB (MIDIChannelCable address, uint16_t value)
 Send a MIDI Pitch Bend event. More...
 

Member Function Documentation

◆ send() [1/4]

void send ( ChannelMessage  message)

Send a MIDI Channel Voice message.

Definition at line 125 of file MIDI_Sender.ipp.

◆ sendChannelMessage() [1/2]

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

Send a 3-byte MIDI Channel Voice message.

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. [CABLE_1, CABLE_16]

Definition at line 7 of file MIDI_Sender.ipp.

◆ sendChannelMessage() [2/2]

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

Send a 2-byte MIDI Channel Voice message.

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 14 of file MIDI_Sender.ipp.

◆ sendNoteOn()

void sendNoteOn ( MIDIAddress  address,
uint8_t  velocity 
)

Send a MIDI Note On event.

Definition at line 20 of file MIDI_Sender.ipp.

◆ sendNoteOff()

void sendNoteOff ( MIDIAddress  address,
uint8_t  velocity 
)

Send a MIDI Note Off event.

Definition at line 31 of file MIDI_Sender.ipp.

◆ sendKeyPressure()

void sendKeyPressure ( MIDIAddress  address,
uint8_t  pressure 
)

Send a MIDI Key Pressure event.

Definition at line 42 of file MIDI_Sender.ipp.

◆ sendControlChange()

void sendControlChange ( MIDIAddress  address,
uint8_t  value 
)

Send a MIDI Control Change event.

Definition at line 54 of file MIDI_Sender.ipp.

◆ sendProgramChange() [1/2]

void sendProgramChange ( MIDIAddress  address)

Send a MIDI Program Change event.

Definition at line 78 of file MIDI_Sender.ipp.

◆ sendProgramChange() [2/2]

void sendProgramChange ( MIDIChannelCable  address,
uint8_t  value 
)

Send a MIDI Program Change event.

Definition at line 66 of file MIDI_Sender.ipp.

◆ sendChannelPressure()

void sendChannelPressure ( MIDIChannelCable  address,
uint8_t  pressure 
)

Send a MIDI Channel Pressure event.

Definition at line 89 of file MIDI_Sender.ipp.

◆ sendPitchBend()

void sendPitchBend ( MIDIChannelCable  address,
uint16_t  value 
)

Send a MIDI Pitch Bend event.

Definition at line 101 of file MIDI_Sender.ipp.

◆ send() [2/4]

void send ( SysCommonMessage  message)

Send a MIDI System Common message.

Definition at line 133 of file MIDI_Sender.ipp.

◆ sendSysCommon() [1/3]

void sendSysCommon ( MIDIMessageType  m,
Cable  cable = CABLE_1 
)

Send a MIDI System Common message.

Definition at line 153 of file MIDI_Sender.ipp.

◆ sendSysCommon() [2/3]

void sendSysCommon ( MIDIMessageType  m,
uint8_t  data1,
Cable  cable = CABLE_1 
)

Send a MIDI System Common message.

Definition at line 157 of file MIDI_Sender.ipp.

◆ sendSysCommon() [3/3]

void sendSysCommon ( MIDIMessageType  m,
uint8_t  data1,
uint8_t  data2,
Cable  cable = CABLE_1 
)

Send a MIDI System Common message.

Definition at line 162 of file MIDI_Sender.ipp.

◆ sendMTCQuarterFrame() [1/2]

void sendMTCQuarterFrame ( uint8_t  data,
Cable  cable = CABLE_1 
)

Send a MIDI Time Code Quarter Frame.

Definition at line 168 of file MIDI_Sender.ipp.

◆ sendMTCQuarterFrame() [2/2]

void sendMTCQuarterFrame ( uint8_t  messageType,
uint8_t  values,
Cable  cable = CABLE_1 
)

Send a MIDI Time Code Quarter Frame.

Definition at line 172 of file MIDI_Sender.ipp.

◆ sendSongPositionPointer()

void sendSongPositionPointer ( uint16_t  spp,
Cable  cable = CABLE_1 
)

Send a MIDI Song Position Pointer message.

Definition at line 177 of file MIDI_Sender.ipp.

◆ sendSongSelect()

void sendSongSelect ( uint8_t  song,
Cable  cable = CABLE_1 
)

Send a MIDI Song Select message.

Definition at line 183 of file MIDI_Sender.ipp.

◆ sendTuneRequest()

void sendTuneRequest ( Cable  cable = CABLE_1)

Send a MIDI Tune Request.

Definition at line 187 of file MIDI_Sender.ipp.

◆ send() [3/4]

void send ( SysExMessage  message)

Send a MIDI System Exclusive message.

Definition at line 113 of file MIDI_Sender.ipp.

◆ sendSysEx() [1/2]

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

Send a MIDI System Exclusive message.

Definition at line 142 of file MIDI_Sender.ipp.

◆ sendSysEx() [2/2]

void sendSysEx ( const uint8_t *  data,
uint16_t  length,
Cable  cable = CABLE_1 
)

Send a MIDI System Exclusive message.

Definition at line 147 of file MIDI_Sender.ipp.

◆ send() [4/4]

void send ( RealTimeMessage  message)

Send a MIDI Real-Time message.

Definition at line 119 of file MIDI_Sender.ipp.

◆ sendRealTime() [1/2]

void sendRealTime ( MIDIMessageType  rt,
Cable  cable = CABLE_1 
)

Send a MIDI Real-Time message.

Definition at line 192 of file MIDI_Sender.ipp.

◆ sendRealTime() [2/2]

void sendRealTime ( uint8_t  rt,
Cable  cable = CABLE_1 
)

Send a MIDI Real-Time message.

Definition at line 196 of file MIDI_Sender.ipp.

◆ sendTimingClock()

void sendTimingClock ( Cable  cable = CABLE_1)

Send a MIDI Timing Clock message.

Definition at line 201 of file MIDI_Sender.ipp.

◆ sendStart()

void sendStart ( Cable  cable = CABLE_1)

Send a MIDI Start message.

Definition at line 205 of file MIDI_Sender.ipp.

◆ sendContinue()

void sendContinue ( Cable  cable = CABLE_1)

Send a MIDI Continue message.

Definition at line 209 of file MIDI_Sender.ipp.

◆ sendStop()

void sendStop ( Cable  cable = CABLE_1)

Send a MIDI Stop message.

Definition at line 213 of file MIDI_Sender.ipp.

◆ sendActiveSensing()

void sendActiveSensing ( Cable  cable = CABLE_1)

Send a MIDI Active Sensing message.

Definition at line 217 of file MIDI_Sender.ipp.

◆ sendSystemReset()

void sendSystemReset ( Cable  cable = CABLE_1)

Send a MIDI System Reset message.

Definition at line 221 of file MIDI_Sender.ipp.

◆ sendNow()

void sendNow

Causes all buffered messages to be sent immediately.

Note
Doesn't necessarily wait until all data has been sent, it just triggers the transmission, so everything will be transmitted as soon as possible.

Definition at line 226 of file MIDI_Sender.ipp.

◆ sendKP()

void sendKP ( MIDIAddress  address,
uint8_t  pressure 
)

Send a MIDI Key Pressure event.

Definition at line 231 of file MIDI_Sender.ipp.

◆ sendCC()

void sendCC ( MIDIAddress  address,
uint8_t  value 
)

Send a MIDI Control Change event.

Definition at line 235 of file MIDI_Sender.ipp.

◆ sendPC() [1/2]

void sendPC ( MIDIAddress  address)

Send a MIDI Program Change event.

Definition at line 239 of file MIDI_Sender.ipp.

◆ sendPC() [2/2]

void sendPC ( MIDIChannelCable  address,
uint8_t  value 
)

Send a MIDI Program Change event.

Definition at line 243 of file MIDI_Sender.ipp.

◆ sendCP()

void sendCP ( MIDIChannelCable  address,
uint8_t  pressure 
)

Send a MIDI Channel Pressure event.

Definition at line 247 of file MIDI_Sender.ipp.

◆ sendPB()

void sendPB ( MIDIChannelCable  address,
uint16_t  value 
)

Send a MIDI Pitch Bend event.

Definition at line 251 of file MIDI_Sender.ipp.


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