MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
26 #if defined(ARDUINO) && defined(DEBUG_OUT)
31 ExtendedIOElement::beginAll();
61 FATAL_ERROR(
F(
"No default MIDI interface is selected."), 0xDEAD);
75 #ifdef DEBUG_MIDI_PACKETS
91 DEBUG(
F(
"Reset All Controllers"));
99 DEBUGFN(
F(
"Updating CC elements with new MIDI message."));
104 DEBUGFN(
F(
"Updating Note elements with new MIDI message."));
109 DEBUGFN(
F(
"Updating Channel Pressure elements with new "
114 DEBUGFN(
F(
"Updating Program Change elements with new "
124 #ifdef DEBUG_MIDI_PACKETS
125 const uint8_t *data = msg.
data;
129 for (
size_t i = 0; i < len; i++)
162 if (thisDisplay != previousDisplay) {
167 displayElement.draw();
168 previousDisplay = thisDisplay;
uint8_t getCN() const
Return the cable number of the received message.
static MIDI_Interface * getDefault()
Return the default MIDI interface.
constexpr uint8_t All_Notes_Off
A super class for object that have to be updated regularly.
const uint8_t CHANNEL_PRESSURE
An interface for elements that draw to a display.
static void beginAll()
Initialize all displays.
ChannelMessage getChannelMessage()
Return the received channel message.
void onSysExMessage(Parsing_MIDI_Interface &midi) override
The callback to be called when a MIDI System Exclusive message is received.
static DoublyLinkedList< DisplayElement > & getAll()
Get the list of all DisplayElement instances.
An abstract class for MIDI interfaces.
An interface for displays.
void updateInputs()
Update all MIDIInputElements.
void onChannelMessage(Parsing_MIDI_Interface &midi) override
The callback to be called when a MIDI channel message is received.
#define BEGIN_CS_NAMESPACE
Struct for easily matching MIDI messages.
A class that reads and filters an analog input.
An abstract base class for Extended Input/Output elements.
MIDI_Interface & MIDI()
Get the MIDI interface of the Control Surface.
void clearAndDrawBackground()
Clear the frame buffer, and draw the custom background.
#define FATAL_ERROR(msg, errc)
Print the error message and error code, and stop the execution.
Timer< micros > displayTimer
A timer to know when to refresh the displays.
void updateMidiInput()
Update all MIDI interfaces to receive new MIDI events.
void onRealtimeMessage(Parsing_MIDI_Interface &midi, uint8_t message) override
The callback to be called when a MIDI Real-Time message is received.
virtual void update()=0
Read the MIDI interface and call the callback if a message is received.
ChannelMessageCallback channelMessageCallback
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
const uint8_t PROGRAM_CHANGE
#define DEBUG_OUT
The debug output.
Timer< micros > potentiometerTimer
A timer to know when to update the analog inputs.
SysExMessageCallback sysExMessageCallback
RealTimeMessageCallback realTimeMessageCallback
Print & hex(Print &printer)
virtual void setCallbacks(MIDI_Callbacks *cb)=0
Set the callbacks that will be called when a MIDI message is received.
void begin()
Initialize the Control_Surface.
#define DEBUGFN(x)
Print an expression and its function (function name and line number) to the debug output if debugging...
Print & endl(Print &printer)
void updateDisplays()
Clear, draw and display all displays.
virtual void display()=0
Write the frame buffer to the display.
An abstract class for MIDI interfaces.
Print & dec(Print &printer)
#define DEBUG(x)
Print an expression to the debug output if debugging is enabled.
This class ensures initialization, updating, and interaction between all other classes,...
SysExMessage getSysExMessage() const
Return the received system exclusive message.
constexpr unsigned long defaultBaudRate
The default baud rate for debug output.
void loop()
Update all MIDI elements, send MIDI events and read MIDI input.
static Control_Surface_ & getInstance()
Return the static Control_Surface_ instance.
void begin()
Initialize the timer.
virtual void begin()
Initialize the MIDI Interface.