Browse Source

Allow capital note names A--G in MIDI to Gate and Gate to MIDI.

tags/v2.6.5
Andrew Belt 5 months ago
parent
commit
6494ded230
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      src/core/plugin.hpp

+ 5
- 2
src/core/plugin.hpp View File

@@ -213,11 +213,14 @@ struct NoteChoice : LedDisplayChoice {
}

void onSelectText(const SelectTextEvent& e) override {
int c = e.codepoint;
uint32_t c = e.codepoint;
static const int majorNotes[7] = {9, 11, 0, 2, 4, 5, 7};
if ('a' <= c && c <= 'g') {
static const int majorNotes[7] = {9, 11, 0, 2, 4, 5, 7};
focusNote = majorNotes[c - 'a'];
}
else if ('A' <= c && c <= 'G') {
focusNote = majorNotes[c - 'A'];
}
else if (c == '#') {
if (focusNote >= 0) {
focusNote += 1;


Loading…
Cancel
Save