| 
   
    MIDI Control Surface library for Arduino 
   | 
 
 
 
 
Go to the documentation of this file.
  103             ERROR(
F(
"Error: invalid SysEx length"), 0x7F7F);
 
  140 #pragma GCC diagnostic push 
  141 #pragma GCC diagnostic ignored "-Wswitch-enum" 
  152 #pragma GCC diagnostic pop 
  
constexpr uint8_t getRawChannel() const
Get the channel as an integer [0, 15].
 
uint8_t getCN() const
Return the cable number of the received message.
 
void setAsDefault()
Set this MIDI interface as the default interface.
 
static MIDI_Interface * getDefault()
Return the default MIDI interface.
 
constexpr uint8_t getCableNumber() const
Get the cable number [0, 15].
 
const uint8_t CHANNEL_PRESSURE
 
ChannelMessage getChannelMessage()
Return the received channel message.
 
bool dispatchMIDIEvent(MIDI_read_t event)
 
virtual MIDI_read_t read()=0
 
void sendPB(MIDICNChannel address, uint16_t value)
Send a MIDI Pitch Bend event.
 
virtual void onRealtimeMessage(Parsing_MIDI_Interface &midi, uint8_t message)
 
#define BEGIN_CS_NAMESPACE
 
virtual ~MIDI_Interface()
Destructor.
 
void sendCC(MIDICNChannelAddress address, uint8_t value)
Send a MIDI Control Change event.
 
void onRealtimeMessage(uint8_t message)
 
#define ERROR(msg, errc)
Print the error message and error code, and stop the execution if FATAL_ERRORS are enabled.
 
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
 
static MIDI_Interface * DefaultMIDI_Interface
 
void sendNoteOff(MIDICNChannelAddress address, uint8_t velocity)
Send a MIDI Note Off event.
 
void update() override
Read the MIDI interface and call the callback if a message is received.
 
void sendKP(MIDICNChannelAddress address, uint8_t pressure)
Send a MIDI Key Pressure event.
 
MIDI_Callbacks * callbacks
 
const uint8_t PROGRAM_CHANGE
 
A class for saving a MIDI channel and cable number.
 
constexpr uint8_t getAddress() const
Get the address [0, 127].
 
ChannelMessage getChannelMessage()
Get the latest MIDI channel message.
 
void sendCP(MIDICNChannel address, uint8_t pressure)
Send a MIDI Channel Pressure event.
 
Parsing_MIDI_Interface(MIDI_Parser &parser)
Construct a MIDI interface with the given parser.
 
void send(uint8_t m, uint8_t c, uint8_t d1, uint8_t d2)
Send a 3-byte MIDI packet.
 
void sendNoteOn(MIDICNChannelAddress address, uint8_t velocity)
Send a MIDI Note On event.
 
void sendOnCable(uint8_t m, uint8_t c, uint8_t d1, uint8_t d2, uint8_t cn)
Send a 3-byte MIDI packet with cable number.
 
virtual void onChannelMessage(Parsing_MIDI_Interface &midi)
 
constexpr uint8_t getRawChannel() const
Get the channel [0, 15].
 
void sendPC(MIDICNChannelAddress address)
Send a MIDI Program Change event.
 
An abstract class for MIDI interfaces.
 
virtual void onSysExMessage(Parsing_MIDI_Interface &midi)
 
virtual SysExMessage getSysEx() const =0
Get the latest SysEx message.
 
constexpr uint8_t getCableNumber() const
Get the cable number [0, 15].
 
MIDI_Interface()
Constructor.
 
SysExMessage getSysExMessage() const
Return the received system exclusive message.
 
virtual uint8_t getCN() const
Get the cable number of the latests MIDI message.
 
virtual void sendImpl(uint8_t m, uint8_t c, uint8_t d1, uint8_t d2, uint8_t cn)=0
Low-level function for sending a 3-byte MIDI message.
 
const uint8_t KEY_PRESSURE