36 lines
597 B
Markdown
36 lines
597 B
Markdown
# Transposer
|
|
|
|
Note transposition via increment/decrement buttons.
|
|
|
|
> Original: `Transposer.ino`
|
|
|
|
```cpp
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface midi;
|
|
|
|
Transposer<-12, +12> transposer;
|
|
|
|
NoteButton button {5, {MIDI_Notes::C[4], Channel_1}};
|
|
|
|
IncrementDecrementSelector<25> selector {
|
|
transposer,
|
|
{2, 3},
|
|
Wrap::Clamp,
|
|
};
|
|
|
|
int main() {
|
|
stdio_init_all();
|
|
if (cyw43_arch_init()) return 1;
|
|
Control_Surface.begin();
|
|
while (true) {
|
|
Control_Surface.loop();
|
|
sleep_ms(1);
|
|
}
|
|
}
|
|
```
|