Dual-MIDI-Interface
This example demonstrates how to group together two or more MIDI interfaces, so you can send the MIDI output over both MIDI USB and 5-pin DIN MIDI, for example. MIDI input is received from all interfaces as well.
Also have a look at the MIDI_Pipes-Routing.ino example, the MIDI Routing module and the MIDI_Pipe documentation for more information about MIDI routing.
Control Surface can be used as both a MIDI sink and a MIDI source.
When you call Control_Surface.begin()
, it automatically connects itself to the default MIDI interface (MIDI_Interface::getDefault()).
If you want to route everything manually, you have to connect it before calling Control_Surface.begin()
, or you have to disconnect the default pipes before connecting your own, using Control_Surface_::disconnectMIDI_Interfaces().
- Boards:
- AVR USB, Nano Every, Due, Teensy 3.x
Connections
- A0: wiper of a potentiometer
Connect the left terminal of the potentiometer to ground, and the right one to VCC.
Behavior
- When you turn the potentiometer, you should receive MIDI Control Change events on both the Serial MIDI interface and the USB MIDI interface.
- When a MIDI Note event for middle C is received on either MIDI interface, the state of the built-in LED will change accordingly.
Mapping
Written by PieterP, 2019-08-22
https://github.com/tttapa/Control-Surface
void setup() {
}
void loop() {
}
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.
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.
A class for MIDI interfaces sending and receiving MIDI messages over a Hardware Serial port.
Generic base class for classes that listen for MIDI Note, Control Change and Key Pressure events on a...
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
constexpr uint8_t General_Purpose_Controller_1
Class that produces multiple MIDI_Pipes.