32 lines
656 B
C++
32 lines
656 B
C++
// Dual MIDI — BLE + USB with pipe routing.
|
|
// Elements send to both interfaces simultaneously.
|
|
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include "tusb.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface ble;
|
|
USBMIDI_Interface usb;
|
|
|
|
MIDI_PipeFactory<2> pipes;
|
|
|
|
NoteButton button {5, {MIDI_Notes::C[4], Channel_1}};
|
|
CCRotaryEncoder enc {{0, 2}, {16, Channel_1}, 1, 4};
|
|
|
|
int main() {
|
|
stdio_init_all();
|
|
if (cyw43_arch_init()) return 1;
|
|
tusb_init();
|
|
|
|
Control_Surface >> pipes >> ble;
|
|
Control_Surface >> pipes >> usb;
|
|
|
|
Control_Surface.begin();
|
|
while (true) {
|
|
Control_Surface.loop();
|
|
}
|
|
}
|