11#include <Settings/SettingsWrapper.hpp>
151#if CS_TRUE_CONTROL_SURFACE_INSTANCE || defined(DOXYGEN)
163#define Control_Surface (Control_Surface_::getInstance())
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
#define BEGIN_CS_NAMESPACE
constexpr uint8_t MAX_FPS
The maximum frame rate of the displays.
A class that reads and filters an analog input.
A class for easily managing timed events.
A super class for object that have to be updated regularly.
This class ensures initialization, updating, and interaction between all other classes,...
void updateDisplays()
Clear, draw and display all displays that contain display elements that have changed.
Timer< micros > displayTimer
A timer to know when to refresh the displays.
bool connectDefaultMIDI_Interface()
Connect Control Surface to the default MIDI interface.
void disconnectMIDI_Interfaces()
Disconnect Control Surface from the MIDI interfaces it's connected to.
void sendNowImpl()
Low-level function for sending any buffered outgoing MIDI messages.
void updateInputs()
Update all MIDIInputElements.
ChannelMessageCallback channelMessageCallback
Control_Surface_(Control_Surface_ const &)=delete
Copying is not allowed.
void setMIDIInputCallbacks(ChannelMessageCallback channelMessageCallback, SysExMessageCallback sysExMessageCallback, SysCommonMessageCallback sysCommonMessageCallback, RealTimeMessageCallback realTimeMessageCallback)
Set the MIDI input callbacks.
Control_Surface_()=default
Control_Surface_ is a singleton, so the constructor is private.
bool(*)(SysExMessage) SysExMessageCallback
Callback function type for SysEx messages.
bool(*)(ChannelMessage) ChannelMessageCallback
Callback function type for channel messages.
bool(*)(RealTimeMessage) RealTimeMessageCallback
Callback function type for Real-Time messages.
static Control_Surface_ & getInstance()
Return the static Control_Surface_ instance (Control_Surface_ is a singleton.)
void updateMidiInput()
Update all MIDI interfaces to receive new MIDI events.
Control_Surface_ & operator=(Control_Surface_ const &)=delete
Copying is not allowed.
void sendSysExImpl(SysExMessage)
Low-level function for sending a system exclusive MIDI message.
bool(*)(SysCommonMessage) SysCommonMessageCallback
Callback function type for System Common messages.
void sinkMIDIfromPipe(ChannelMessage msg) override
Accept an incoming MIDI Channel message.
SysCommonMessageCallback sysCommonMessageCallback
void begin()
Initialize the Control_Surface.
RealTimeMessageCallback realTimeMessageCallback
void beginDisplays()
Initialize all displays that have at least one display element.
SysExMessageCallback sysExMessageCallback
void sendSysCommonImpl(SysCommonMessage)
Low-level function for sending a MIDI system common message.
void sendChannelMessageImpl(ChannelMessage)
Low-level function for sending a MIDI channel voice message.
void sendRealTimeImpl(RealTimeMessage)
Low-level function for sending a MIDI real-time message.
void loop()
Update all MIDI elements, send MIDI events and read MIDI input.
Class that routes MIDI messages from a MIDI_Source to a MIDI_Sink.
Statically polymorphic template for classes that send MIDI messages.
A struct that is both a TrueMIDI_Sink and a TrueMIDI_Source.