Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
MIDI_Sender.hpp
Go to the documentation of this file.
1#pragma once
2
4
6
10template <class Derived>
12 public:
15
17 void send(ChannelMessage message);
18
34 uint8_t d2, Cable cable = Cable_1);
35
49 Cable cable = Cable_1);
50
52 void sendNoteOn(MIDIAddress address, uint8_t velocity);
54 void sendNoteOff(MIDIAddress address, uint8_t velocity);
56 void sendKeyPressure(MIDIAddress address, uint8_t pressure);
58 void sendControlChange(MIDIAddress address, uint8_t value);
62 void sendProgramChange(MIDIChannelCable address, uint8_t value);
64 void sendChannelPressure(MIDIChannelCable address, uint8_t pressure);
66 void sendPitchBend(MIDIChannelCable address, uint16_t value);
67
69
72
74 void send(SysCommonMessage message);
78 void sendSysCommon(MIDIMessageType m, uint8_t data1, Cable cable = Cable_1);
80 void sendSysCommon(MIDIMessageType m, uint8_t data1, uint8_t data2,
81 Cable cable = Cable_1);
82
84 void sendMTCQuarterFrame(uint8_t data, Cable cable = Cable_1);
86 void sendMTCQuarterFrame(uint8_t messageType, uint8_t values,
87 Cable cable = Cable_1);
89 void sendSongPositionPointer(uint16_t spp, Cable cable = Cable_1);
91 void sendSongSelect(uint8_t song, Cable cable = Cable_1);
94
96
99
101 void send(SysExMessage message);
103 template <uint16_t N>
104 void sendSysEx(const uint8_t (&sysexdata)[N], Cable cable = Cable_1);
106 void sendSysEx(const uint8_t *data, uint16_t length, Cable cable = Cable_1);
107
109
112
114 void send(RealTimeMessage message);
118 void sendRealTime(uint8_t rt, Cable cable = Cable_1);
119
123 void sendStart(Cable cable = Cable_1);
127 void sendStop(Cable cable = Cable_1);
132
134
137
142 void sendNow();
143
145
148
151 [[deprecated("Use sendKeyPressure() instead")]] void
152 sendKP(MIDIAddress address, uint8_t pressure);
155 [[deprecated("Use sendControlChange() instead")]] void
156 sendCC(MIDIAddress address, uint8_t value);
159 [[deprecated("Use sendProgramChange() instead")]] void
163 [[deprecated("Use sendProgramChange() instead")]] void
164 sendPC(MIDIChannelCable address, uint8_t value);
167 [[deprecated("Use sendChannelPressure() instead")]] void
168 sendCP(MIDIChannelCable address, uint8_t pressure);
171 [[deprecated("Use sendPitchBend() instead")]] void
172 sendPB(MIDIChannelCable address, uint16_t value);
173
175};
176
178
179#include "MIDI_Sender.ipp"
constexpr Cable Cable_1
Definition Cable.hpp:118
MIDIMessageType
All possible MIDI status byte values (without channel).
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
A type-safe class for MIDI USB Cable numbers.
Definition Cable.hpp:13
A type-safe class for MIDI channels.
Definition Channel.hpp:13
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
A class for saving a MIDI channel and cable number.
Statically polymorphic template for classes that send MIDI messages.
void sendRealTime(uint8_t rt, Cable cable=Cable_1)
Send a MIDI Real-Time message.
void sendNow()
Causes all buffered messages to be sent immediately.
void send(SysCommonMessage message)
Send a MIDI System Common message.
void sendChannelPressure(MIDIChannelCable address, uint8_t pressure)
Send a MIDI Channel Pressure event.
void sendPB(MIDIChannelCable address, uint16_t value)
Send a MIDI Pitch Bend event.
void sendSongSelect(uint8_t song, Cable cable=Cable_1)
Send a MIDI Song Select message.
void sendStop(Cable cable=Cable_1)
Send a MIDI Stop message.
void send(RealTimeMessage message)
Send a MIDI Real-Time message.
void sendContinue(Cable cable=Cable_1)
Send a MIDI Continue message.
void sendKP(MIDIAddress address, uint8_t pressure)
Send a MIDI Key Pressure event.
void sendMTCQuarterFrame(uint8_t messageType, uint8_t values, Cable cable=Cable_1)
Send a MIDI Time Code Quarter Frame.
void sendProgramChange(MIDIChannelCable address, uint8_t value)
Send a MIDI Program Change event.
void sendSysEx(const uint8_t(&sysexdata)[N], Cable cable=Cable_1)
Send a MIDI System Exclusive message.
void send(SysExMessage message)
Send a MIDI System Exclusive message.
void sendProgramChange(MIDIAddress address)
Send a MIDI Program Change event.
void sendChannelMessage(MIDIMessageType m, Channel c, uint8_t d1, uint8_t d2, Cable cable=Cable_1)
Send a 3-byte MIDI Channel Voice message.
void send(ChannelMessage message)
Send a MIDI Channel Voice message.
void sendPC(MIDIChannelCable address, uint8_t value)
Send a MIDI Program Change event.
void sendTimingClock(Cable cable=Cable_1)
Send a MIDI Timing Clock message.
void sendCP(MIDIChannelCable address, uint8_t pressure)
Send a MIDI Channel Pressure event.
void sendCC(MIDIAddress address, uint8_t value)
Send a MIDI Control Change event.
void sendMTCQuarterFrame(uint8_t data, Cable cable=Cable_1)
Send a MIDI Time Code Quarter Frame.
void sendKeyPressure(MIDIAddress address, uint8_t pressure)
Send a MIDI Key Pressure event.
void sendSongPositionPointer(uint16_t spp, Cable cable=Cable_1)
Send a MIDI Song Position Pointer message.
void sendControlChange(MIDIAddress address, uint8_t value)
Send a MIDI Control Change event.
void sendStart(Cable cable=Cable_1)
Send a MIDI Start message.
void sendSysCommon(MIDIMessageType m, uint8_t data1, uint8_t data2, Cable cable=Cable_1)
Send a MIDI System Common message.
void sendSystemReset(Cable cable=Cable_1)
Send a MIDI System Reset message.
void sendPC(MIDIAddress address)
Send a MIDI Program Change event.
void sendTuneRequest(Cable cable=Cable_1)
Send a MIDI Tune Request.
void sendNoteOn(MIDIAddress address, uint8_t velocity)
Send a MIDI Note On event.
void sendSysCommon(MIDIMessageType m, Cable cable=Cable_1)
Send a MIDI System Common message.
void sendChannelMessage(MIDIMessageType m, Channel c, uint8_t d1, Cable cable=Cable_1)
Send a 2-byte MIDI Channel Voice message.
void sendNoteOff(MIDIAddress address, uint8_t velocity)
Send a MIDI Note Off event.
void sendSysEx(const uint8_t *data, uint16_t length, Cable cable=Cable_1)
Send a MIDI System Exclusive message.
void sendRealTime(MIDIMessageType rt, Cable cable=Cable_1)
Send a MIDI Real-Time message.
void sendPitchBend(MIDIChannelCable address, uint16_t value)
Send a MIDI Pitch Bend event.
void sendSysCommon(MIDIMessageType m, uint8_t data1, Cable cable=Cable_1)
Send a MIDI System Common message.
void sendActiveSensing(Cable cable=Cable_1)
Send a MIDI Active Sensing message.