#include <Control_Surface.h> // Include the Control Surface library
// Instantiate a MIDI over USB interface.
USBMIDI_Interface midi;
// Instantiate a CCButton object
CCButton button {0,{MIDI_CC::General_Purpose_Controller_1, CHANNEL_1},};
CCButton button1 {1,{MIDI_CC::General_Purpose_Controller_2, CHANNEL_1},};
CCButton button2 {2,{MIDI_CC::General_Purpose_Controller_3, CHANNEL_1},};
CCButton button3 {3,{MIDI_CC::General_Purpose_Controller_4, CHANNEL_1},};
CCButton button4 {4,{MIDI_CC::General_Purpose_Controller_5, CHANNEL_1},};
CCButton button5 {5,{MIDI_CC::General_Purpose_Controller_6, CHANNEL_1},};
CCButton button6 {6,{MIDI_CC::General_Purpose_Controller_7, CHANNEL_1},};
// Instantiate the LED that will light up when middle C is playing
CCLED led1 {7, {MIDI_CC::General_Purpose_Controller_1, CHANNEL_1},};
CCLED led2 {8, {MIDI_CC::General_Purpose_Controller_2, CHANNEL_1},};
CCLED led3 {9, {MIDI_CC::General_Purpose_Controller_3, CHANNEL_1},};
CCLED led4 {10, {MIDI_CC::General_Purpose_Controller_4, CHANNEL_1},};
CCLED led5 {11, {MIDI_CC::General_Purpose_Controller_5, CHANNEL_1},};
CCLED led6 {12, {MIDI_CC::General_Purpose_Controller_6, CHANNEL_1},};
CCLED led7 {13, {MIDI_CC::General_Purpose_Controller_7, CHANNEL_1},};
// Setup for an Analog pot
CCPotentiometer potentiometer {A0, {MIDI_CC::Sound_Controller_1, CHANNEL_1}};
CCPotentiometer potentiometer1 {A1, {MIDI_CC::Sound_Controller_2, CHANNEL_1}};
CCPotentiometer potentiometer2 {A2, {MIDI_CC::Sound_Controller_3, CHANNEL_1}};
CCPotentiometer potentiometer3 {A3, {MIDI_CC::Sound_Controller_4, CHANNEL_1}};
CCPotentiometer potentiometer4 {A4, {MIDI_CC::Sound_Controller_5, CHANNEL_1}};
CCPotentiometer potentiometer5 {A5, {MIDI_CC::Sound_Controller_6, CHANNEL_1}};
void setup() {
Control_Surface.begin(); // Initialize Control Surface
}
void loop() {
Control_Surface.loop(); // Update the Control Surface
}