MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
11 #if defined(TEENSYDUINO) && !defined(TEENSY_MIDIUSB_ENABLED)
13 "Teensy: USB MIDI not enabled. Enable it from the Tools > USB Type menu."
17 #include <gmock-wrapper.h>
21 #if defined(USBCON) || defined(TEENSY_MIDIUSB_ENABLED) || !defined(ARDUINO)
56 (uint8_t, uint8_t, uint8_t, uint8_t, uint8_t));
70 void sendImpl(uint8_t header, uint8_t d1, uint8_t d2, uint8_t cn)
override {
78 void sendImpl(uint8_t header, uint8_t d1, uint8_t cn)
override {
82 void sendImpl(
const uint8_t *data,
size_t length, uint8_t cn)
override {
97 void sendImpl(uint8_t rt, uint8_t cn)
override {
109 if (midi_packet.
data[0] == 0)
110 return MIDIReadEvent::NO_MESSAGE;
114 if (parseResult != MIDIReadEvent::NO_MESSAGE)
117 return MIDIReadEvent::NO_MESSAGE;
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
void sendImpl(uint8_t header, uint8_t d1, uint8_t cn) override
Low-level function for sending a 2-byte MIDI message.
MIDIReadEvent parse(uint8_t *packet)
An abstract class for MIDI interfaces.
#define BEGIN_CS_NAMESPACE
#define AH_DIAGNOSTIC_POP()
A class for MIDI interfaces sending and receiving MIDI messages over the Serial port of the USB conne...
An array wrapper for easy copying, comparing, and iterating.
void sendImpl(const uint8_t *data, size_t length, uint8_t cn) override
Low-level function for sending a system exclusive MIDI message.
AH::Array< uint8_t, 4 > MIDIUSBPacket_t
void sendImpl(uint8_t header, uint8_t d1, uint8_t d2, uint8_t cn) override
Low-level function for sending a 3-byte MIDI message.
constexpr size_t SYSEX_BUFFER_SIZE
The length of the maximum System Exclusive message that can be received.
MIDIReadEvent read() override
Try reading and parsing a single incoming MIDI message.
void sendImpl(uint8_t rt, uint8_t cn) override
Low-level function for sending a single-byte MIDI message.
#define AH_DIAGNOSTIC_WERROR()
MIDIReadEvent
Result of the MIDI interface read methods.
USBMIDI_Interface()
Construct a new USBMIDI_Interface.
void writeUSBPacket(uint8_t cn, uint8_t cin, uint8_t d0, uint8_t d1, uint8_t d2)
void write(uint8_t cn, uint8_t cin, uint8_t d0, uint8_t d1, uint8_t d2)
MIDIUSBPacket_t readUSBPacket()