From 618e29366d7bbe1036c005ad25c97be7c674d5b1 Mon Sep 17 00:00:00 2001 From: positionhigh Date: Tue, 17 Aug 2021 14:19:57 +0200 Subject: [PATCH] =?UTF-8?q?Dateien=20hochladen=20nach=20=E2=80=9E=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UI.hpp | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/UI.hpp b/UI.hpp index 365f3d1..2fe9b8a 100644 --- a/UI.hpp +++ b/UI.hpp @@ -257,6 +257,7 @@ void UI_func_reverb_send(uint8_t param); void UI_func_filter_cutoff(uint8_t param); void UI_func_filter_resonance(uint8_t param); void UI_func_drum_reverb_send(uint8_t param); +void UI_func_drum_midi_channel(uint8_t param); #endif void UI_func_transpose(uint8_t param); void UI_func_tune(uint8_t param); @@ -3692,6 +3693,38 @@ void UI_func_drum_reverb_send(uint8_t param) } } +void UI_func_drum_midi_channel(uint8_t param) +{ + if (LCDML.FUNC_setup()) // ****** SETUP ********* + { + encoderDir[ENC_R].reset(); + lcd.setCursor(0, 0); + lcd.print(F("MIDI Channel")); + } + if (LCDML.FUNC_loop()) // ****** LOOP ********* + { + if (LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) + drum_midi_channel = constrain(drum_midi_channel + ENCODER[ENC_R].speed(), MIDI_CHANNEL_MIN, MIDI_CHANNEL_MAX); + else if (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) + drum_midi_channel = constrain(drum_midi_channel - ENCODER[ENC_R].speed(), MIDI_CHANNEL_MIN, MIDI_CHANNEL_MAX); + + lcd.setCursor(0, 1); + if (drum_midi_channel == 0) + { + lcd.print(F("[OMNI]")); + } + else + { + lcd_display_int(drum_midi_channel, 4, false, true, false); + } + } + + if (LCDML.FUNC_close()) // ****** STABLE END ********* + { + encoderDir[ENC_R].reset(); + // EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, dexed[0].midi_channel), configuration.dexed[0].midi_channel); } + } +} void UI_func_drums_main_volume(uint8_t param) { char displayname[4] = {0, 0, 0, 0}; @@ -5057,7 +5090,7 @@ void UI_func_arpeggio(uint8_t param) } } lcd.setCursor( 4, 0); - if (arp_lenght==0) lcd.print("A");else lcd.print(arp_lenght); //play all elements or from 1-xx elements + if (arp_lenght == 0) lcd.print("A"); else lcd.print(arp_lenght); //play all elements or from 1-xx elements lcd.setCursor( 6, 1); lcd.print( arp_style_names[arp_style][0] ); lcd.print( arp_style_names[arp_style][1] );