From d809ebba6cafc004021d922ea2ec4c8fd7f78053 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Wed, 28 Sep 2022 08:12:52 +0200 Subject: [PATCH] Added showing a double used note in MIDI drum note menu. --- UI.hpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/UI.hpp b/UI.hpp index d8bfafe..789b89c 100644 --- a/UI.hpp +++ b/UI.hpp @@ -4282,6 +4282,14 @@ void UI_func_drum_reverb_send(uint8_t param) { } } +bool _get_midi_note(uint8_t note) { + for (uint8_t i = DRUMS_MIDI_NOTE_MIN; i <= DRUMS_MIDI_NOTE_MAX; i++) { + if (configuration.drums.drum_midi_note[activesample] == i) + return (true); + } + return (false); +} + void _UI_func_drum_midi_note_display(bool mode) { char temp1[10]; char temp2[10]; @@ -4294,10 +4302,16 @@ void _UI_func_drum_midi_note_display(bool mode) { if (mode == false) { snprintf_P(temp1, sizeof(temp1), PSTR("[%02d]"), activesample + 1); - snprintf_P(temp2, sizeof(temp2), PSTR(" %-3s "), note_name); + if (_get_midi_note == true) + snprintf_P(temp2, sizeof(temp2), PSTR(" %-3s*"), note_name); + else + snprintf_P(temp2, sizeof(temp2), PSTR(" %-3s "), note_name); } else { snprintf_P(temp1, sizeof(temp1), PSTR(" %02d "), activesample + 1); - snprintf_P(temp2, sizeof(temp2), PSTR("[%-3s]"), note_name); + if (_get_midi_note == true) + snprintf_P(temp2, sizeof(temp2), PSTR("<%-3s>"), note_name); + else + snprintf_P(temp2, sizeof(temp2), PSTR(" %-3s*"), note_name); } display.show(1, 0, 4, temp1); display.show(1, 4, 7, basename(drum_config[activesample].name));