This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
1.First-Output.ino

1.First-Output

This is the first example used in the 'Getting Started' guide: https://tttapa.github.io/Control-Surface/Doc/Doxygen/dd/dcc/md_Getting-Started.html

Boards:
AVR, AVR USB, Teensy 3.x, ESP32

Written by PieterP, 2018-08-29
https://github.com/tttapa/Control-Surface

// Include the library
// Instantiate a MIDI Interface to use
// Instantiate an analog multiplexer
CD74HC4051 mux = {
A0, // Analog input pin
{3, 4, 5} // Address pins S0, S1, S2
};
// Create an array of potentiometers that send out
// MIDI Control Change messages when you turn the
// potentiometers connected to the eight input pins of
// the multiplexer
CCPotentiometer volumePotentiometers[] = {
};
// Initialize the Control Surface
void setup() {
}
// Update the Control Surface
void loop() {
}
USBMIDI_Interface
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
Definition: USBMIDI_Interface.hpp:43
CHANNEL_3
constexpr Channel CHANNEL_3
Definition: Channel.hpp:113
CHANNEL_6
constexpr Channel CHANNEL_6
Definition: Channel.hpp:116
CHANNEL_8
constexpr Channel CHANNEL_8
Definition: Channel.hpp:118
Control_Surface.h
The main header file that includes all Control-Surface header files.
CHANNEL_7
constexpr Channel CHANNEL_7
Definition: Channel.hpp:117
AnalogMultiplex
A class for reading multiplexed analog inputs.
Definition: AnalogMultiplex.hpp:25
Control_Surface
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
Definition: Control_Surface_Class.cpp:171
CHANNEL_5
constexpr Channel CHANNEL_5
Definition: Channel.hpp:115
ExtendedIOElement::pin
pin_t pin(pin_t pin) const
Get the extended IO pin number of a given physical pin of this extended IO element.
Definition: ExtendedIOElement.cpp:26
CHANNEL_4
constexpr Channel CHANNEL_4
Definition: Channel.hpp:114
CCPotentiometer
A class of MIDIOutputElements that read the analog input from a potentiometer or fader,...
Definition: CCPotentiometer.hpp:19
Control_Surface_::begin
void begin()
Initialize the Control_Surface.
Definition: Control_Surface_Class.cpp:22
CHANNEL_2
constexpr Channel CHANNEL_2
Definition: Channel.hpp:112
MIDI_CC::Channel_Volume
constexpr uint8_t Channel_Volume
Definition: Control_Change.hpp:23
CHANNEL_1
constexpr Channel CHANNEL_1
Definition: Channel.hpp:111
Control_Surface_::loop
void loop()
Update all MIDI elements, send MIDI events and read MIDI input.
Definition: Control_Surface_Class.cpp:45