From 6494ded230c93a87d5ae195dc77762d3af62c5c2 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 24 Aug 2025 03:00:13 -0400 Subject: [PATCH] Allow capital note names A--G in MIDI to Gate and Gate to MIDI. --- src/core/plugin.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/plugin.hpp b/src/core/plugin.hpp index b47e0ba5..6465675e 100644 --- a/src/core/plugin.hpp +++ b/src/core/plugin.hpp @@ -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;