28 lines
651 B
C++
28 lines
651 B
C++
// NoteRange + LEDs — multiple LEDs respond to a range of incoming notes.
|
|
// Original: examples/2. MIDI Input/1. LEDs/2.Note-Range-LEDs/2.Note-Range-LEDs.ino
|
|
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface midi;
|
|
|
|
NoteLED leds[] {
|
|
{2, {MIDI_Notes::C[4], Channel_1}},
|
|
{3, {MIDI_Notes::D[4], Channel_1}},
|
|
{4, {MIDI_Notes::E[4], Channel_1}},
|
|
{5, {MIDI_Notes::F[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);
|
|
}
|
|
}
|