Control Surface  master
MIDI Control Surface library for Arduino
MIDI_Pipes-Routing.ino

MIDI_Pipes-Routing

MIDI routing using MIDI_Pipes.

Bridges the USB MIDI interface to a Serial MIDI interface, and loops back anything it receives on the USB interface.

You can also use the MIDI pipes to route the input and output of Control Surface itself, not just the input and output of MIDI interfaces. This is demonstrated in the Dual-MIDI-Interface.ino example.

Boards:
AVR USB, Due, Nano 33, Teensy 3.x, ESP32
HardwareSerialMIDI_Interface midiser = Serial1;
void setup() {
midiusb >> pipes >> midiser; // all incoming midi from USB is sent to serial
midiusb << pipes << midiser; // all incoming midi from Serial is sent to USB
midiusb >> pipes >> midiusb; // all incoming midi from USB is looped back
midiusb.begin();
midiser.begin();
}
void loop() {
midiusb.update();
midiser.update();
}
USBMIDI_Interface
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
Definition: USBMIDI_Interface.hpp:41
MIDI_PipeFactory
Class that produces multiple MIDI_Pipes.
Definition: MIDI_Pipes.hpp:517
Control_Surface.h
The main header file that includes all Control-Surface header files.
Parsing_MIDI_Interface::update
void update() override
Read the MIDI interface and call the callback if a message is received.
Definition: MIDI_Interface.cpp:49
HardwareSerialMIDI_Interface
A class for MIDI interfaces sending and receiving MIDI messages over a Hardware Serial port.
Definition: SerialMIDI_Interface.hpp:138
MIDI_Interface::begin
void begin() override
Initialize the MIDI Interface.
Definition: MIDI_Interface.hpp:146