29 lines
739 B
C++
29 lines
739 B
C++
// MIDI Pipes — routing between interfaces.
|
|
// Original: examples/3. MIDI Interfaces/MIDI_Pipes-Routing/MIDI_Pipes-Routing.ino
|
|
// Demonstrates pipe factory operators for connecting interfaces.
|
|
//
|
|
// Pipe operators:
|
|
// a >> pipes >> b — forward A->B
|
|
// a << pipes << b — forward B->A
|
|
// a | pipes | b — bidirectional (uses BidirectionalMIDI_PipeFactory)
|
|
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface ble;
|
|
|
|
NoteButton button {5, {MIDI_Notes::C[4], Channel_1}};
|
|
|
|
int main() {
|
|
stdio_init_all();
|
|
if (cyw43_arch_init()) return 1;
|
|
Control_Surface.begin();
|
|
while (true) {
|
|
Control_Surface.loop();
|
|
sleep_ms(1);
|
|
}
|
|
}
|