USBHostMIDI_Interface-Passthrough
This example demonstrates how to use the USBHostMIDI_Interface to send and receive MIDI data to and from USB MIDI devices connected to a Teensy's USB Host port.
- Boards: 🛈
- Teensy 3.6, Teensy 4.1
Connections
- Use a USB Host cable to connect a MIDI USB device to the Teensy. Connect the primary USB port of the Teensy to a computer.
Behavior
- All messages sent from the computer to the Teensy are forwarded to the USB MIDI device.
- All messages sent by the USB MIDI device are forwarded to the computer.
Mapping
Written by PieterP, 2021-01-31
https://github.com/tttapa/Control-Surface
USBHost usb;
USBHub hub {usb};
void setup() {
delay(1500);
hostmidi | p | devicemidi;
hostmidi.begin();
}
void loop() {
hostmidi.update();
}
The main header file that includes all Control-Surface header files.
void update() override
Poll the backend (if necessary) and invoke the callbacks for any received MIDI messages,...
void begin() override
Initialize.
A class for MIDI interfaces sending MIDI messages to a MIDI USB device connected to a Teensy's USB ho...
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
std::pair< MIDI_Pipe, MIDI_Pipe > BidirectionalMIDI_Pipe
A bidirectional pipe consists of two unidirectional pipes.