5#include <AH/STL/utility>
53 const char *
getName()
const override {
return "ser"; }
145#if !defined(TEENSYDUINO) || \
146 (defined(TEENSYDUINO) && defined(TEENSY_SERIALUSB_ENABLED))
MIDIReadEvent
Values returned by the MIDI reading functions.
#define BEGIN_CS_NAMESPACE
constexpr unsigned long HAIRLESS_BAUD
The baud rate to use for Hairless MIDI.
HairlessMIDI_Interface(unsigned long baud=HAIRLESS_BAUD)
Construct a HairlessMIDI_Interface.
HardwareSerialMIDI_Interface(HardwareSerial &serial, unsigned long baud=MIDI_BAUD)
Construct a new MIDI Interface on the given HardwareSerial interface with the given baud rate.
virtual void handleStall()=0
Call back that should finish any MIDI messages that are in progress, and un-stall the pipe or MIDI so...
SerialMIDI_Interface(S &serial, unsigned long baud=MIDI_BAUD)
Create a new MIDI Interface on the given Serial interface with the given baud rate.
void begin() override
Start the Serial interface at the predefined baud rate.
Parser for Serial MIDI streams (and BLE-MIDI).
ChannelMessage getChannelMessage() const
Return the received channel voice message.
RealTimeMessage getRealTimeMessage() const
Return the received real-time message.
void sendChannelMessageImpl(ChannelMessage) override
Low-level function for sending a MIDI channel voice message.
StreamMIDI_Interface(Stream &stream)
Constructor.
void handleStall() override
Call back that should finish any MIDI messages that are in progress, and un-stall the pipe or MIDI so...
void update() override
Read the MIDI interface and call the callback if a message was received.
void sendNowImpl() override
Low-level function for sending any buffered outgoing MIDI messages.
SysCommonMessage getSysCommonMessage() const
Return the received system common message.
void sendRealTimeImpl(RealTimeMessage) override
Low-level function for sending a MIDI real-time message.
const char * getName() const override
Get the staller's name for debugging purposes.
void sendSysExImpl(SysExMessage) override
Low-level function for sending a system exclusive MIDI message.
void sendSysCommonImpl(SysCommonMessage) override
Low-level function for sending a MIDI system common message.
MIDIReadEvent read()
Try reading and parsing a single incoming MIDI message.
SysExMessage getSysExMessage() const
Return the received system exclusive message.
USBSerialMIDI_Interface(unsigned long baud)
Construct a USBSerialMIDI_Interface with the given baud rate.