Control Surface main
MIDI Control Surface library for Arduino
No Matches


// MIDI Interface to use
// Bank with 120 settings in total, increments of 1 address at a time
Bank<120> bank {1};
// A rotary encoder to select one of the 120 bank settings
bank, // bank to manage
{2, 3}, // encoder pins
4, // encoder pulses per step
Wrap::Clamp, // clamp or wrap around when going beyond maximum/minimum setting
// The potentiometer that sends MIDI messages
// the address (controller number) depends on the bank setting
{bank, BankType::ChangeAddress}, // Bank configuration
A0, // Analog pin for potentiometer
{0x00, Channel_1}, // Base CC address
void setup() {
void loop() {
// You can get the bank number using:
// bank.getSelection();
@ ChangeAddress
Change the offset of the address (i.e.
constexpr Channel Channel_1
Definition Channel.hpp:118
The main header file that includes all Control-Surface header files.
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
@ Clamp
When the maximum (minimum) setting is reached, clamp to the maximum (minimum) setting.
A class that groups Bankable MIDI Output Elements and Bankable MIDI Input Elements,...
Definition Bank.hpp:94
A class of MIDIOutputElements that read the analog input from a potentiometer or fader,...
void begin()
Initialize the Control_Surface.
void loop()
Update all MIDI elements, send MIDI events and read MIDI input.
Selector that reads from a rotary encoder.
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.