cs-midi-docs/docs/examples/02-input/02-note-range-leds.md

33 lines
613 B
Markdown

# NoteRangeLEDs
Multiple LEDs respond to a range of incoming notes.
> Original: `2.Note-Range-LEDs.ino`
```cpp pico
#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);
}
}
```