25 lines
614 B
C++
25 lines
614 B
C++
// BLE MIDI — basic Bluetooth Low Energy MIDI interface setup.
|
|
// This is the primary interface for cs-midi on pico-sdk.
|
|
// Replaces USBMIDI_Interface from the original Control Surface library.
|
|
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface midi;
|
|
|
|
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;
|
|
Control_Surface.begin();
|
|
while (true) {
|
|
Control_Surface.loop();
|
|
sleep_ms(1);
|
|
}
|
|
}
|