MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
7 #include <Settings/SettingsWrapper.hpp>
29 while (
stream.available() > 0) {
30 uint8_t midiByte =
stream.read();
41 void sendImpl(uint8_t m, uint8_t c, uint8_t d1, uint8_t d2,
42 uint8_t cn)
override {
50 void sendImpl(uint8_t m, uint8_t c, uint8_t d1, uint8_t cn)
override {
57 void sendImpl(
const uint8_t *data,
size_t length, uint8_t cn)
override {
59 stream.write(data, length);
63 void sendImpl(uint8_t rt, uint8_t cn)
override {
149 #if !defined(TEENSYDUINO) || \
150 (defined(TEENSYDUINO) && defined(TEENSY_SERIALUSB_ENABLED))
174 #if defined(__AVR__) || (defined(TEENSYDUINO) && TEENSYDUINO != 147) || \
175 (defined(TEENSYDUINO) && !defined(__IMXRT1052__) && \
176 !defined(__IMXRT1062__))
178 #include <SoftwareSerial.h>
void sendImpl(uint8_t rt, uint8_t cn) override
Low-level function for sending a single-byte MIDI message.
A class for MIDI interfaces sending and receiving MIDI messages over a SoftwareSerial interface.
A wrapper class for MIDI interfaces sending and receiving MIDI messages over a Serial port of generic...
MIDI_read_t parse(uint8_t midibyte)
constexpr unsigned long HAIRLESS_BAUD
The baud rate to use for Hairless MIDI.
void sendImpl(const uint8_t *data, size_t length, uint8_t cn) override
Low-level function for sending a system exclusive MIDI message.
An abstract class for MIDI interfaces.
#define BEGIN_CS_NAMESPACE
A class for MIDI interfaces sending and receiving MIDI messages over the Serial port of the USB conne...
SerialMIDI_Interface(T &serial, unsigned long baud=MIDI_BAUD)
Create a new MIDI Interface on the given Serial interface with the given baud rate.
SoftwareSerialMIDI_Interface(SoftwareSerial &serial, unsigned long baud)
Create a SoftwareSerialMIDI_Interface on the given SoftwareSerial interface with the given baud rate.
A class for MIDI Interfaces sending and receiving data over the USB Serial CDC connection for the use...
A class for MIDI interfaces sending and receiving MIDI messages over a Hardware Serial port.
void sendImpl(uint8_t m, uint8_t c, uint8_t d1, uint8_t d2, uint8_t cn) override
Low-level function for sending a 3-byte MIDI message.
void sendImpl(uint8_t m, uint8_t c, uint8_t d1, uint8_t cn) override
Low-level function for sending a 2-byte MIDI message.
StreamMIDI_Interface(Stream &stream)
Construct a StreamMIDI_Interface on the given Stream.
USBSerialMIDI_Interface(unsigned long baud)
Construct a USBSerialMIDI_Interface with the given baud rate.
HairlessMIDI_Interface()
Construct a HairlessMIDI_Interface.
void begin() override
Start the Serial interface at the predefined baud rate.
A class for MIDI interfaces sending and receiving MIDI messages over a Stream.
HardwareSerialMIDI_Interface(HardwareSerial &serial, unsigned long baud=MIDI_BAUD)
Construct a new MIDI Interface on the given HardwareSerial interface with the given baud rate.
MIDI_read_t read() override