diff --git a/UI.h b/UI.h index 44541b9..84406f9 100644 --- a/UI.h +++ b/UI.h @@ -88,7 +88,7 @@ LCDML_add(54, LCDML_0_1_6, 2, "Velocity Lvl", UI_func_velocity_level); LCDML_add(55, LCDML_0_1, 7, "Operator", UI_handle_OP); LCDML_add(56, LCDML_0_1, 8, "Save Voice", UI_func_save_voice); LCDML_add(57, LCDML_0, 2, "Drums", NULL); -LCDML_add(58, LCDML_0_2, 1, "Main Volume", UI_func_drums_main_volume); +LCDML_add(58, LCDML_0_2, 1, "Main Volume", UI_func_drum_main_volume); LCDML_add(59, LCDML_0_2, 2, "Vol Min/Max", UI_func_drum_vol_min_max); LCDML_add(60, LCDML_0_2, 3, "Panorama", UI_func_drum_pan); LCDML_add(61, LCDML_0_2, 4, "Reverb Send", UI_func_drum_reverb_send); @@ -99,7 +99,7 @@ LCDML_add(65, LCDML_0, 3, "E-Piano", NULL); LCDML_add(66, LCDML_0_3, 1, "Voice Level", UI_func_epiano_sound_intensity); LCDML_add(67, LCDML_0_3, 2, "Panorama", UI_func_epiano_panorama); LCDML_add(68, LCDML_0_3, 3, "Sound", NULL); -LCDML_add(69, LCDML_0_3_3, 1, "Decay", UI_func_epiano_decay); // uint8_t decay; +LCDML_add(69, LCDML_0_3_3, 1, "Decay", UI_func_epiano_decay); LCDML_add(70, LCDML_0_3_3, 2, "Release", UI_func_epiano_release); // uint8_t release; LCDML_add(71, LCDML_0_3_3, 3, "Hardness", UI_func_epiano_hardness); // uint8_t hardness; LCDML_add(72, LCDML_0_3_3, 4, "Treble", UI_func_epiano_treble); // uint8_t treble; diff --git a/UI.hpp b/UI.hpp index ba7f6e2..b673ece 100644 --- a/UI.hpp +++ b/UI.hpp @@ -319,7 +319,7 @@ void UI_func_epiano_chorus_waveform(uint8_t param); void UI_func_epiano_chorus_depth(uint8_t param); void UI_func_epiano_chorus_level(uint8_t param); void UI_func_drum_midi_channel(uint8_t param); -void UI_func_drums_main_volume(uint8_t param); +void UI_func_drum_main_volume(uint8_t param); void UI_func_drum_vol_min_max(uint8_t param); void UI_func_drum_pan(uint8_t param); void UI_func_drum_pitch(uint8_t param); @@ -3976,7 +3976,7 @@ void UI_func_drum_midi_channel(uint8_t param) { } } -void UI_func_drums_main_volume(uint8_t param) { +void UI_func_drum_main_volume(uint8_t param) { #if NUM_DRUMS == 0 if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -4370,11 +4370,14 @@ void UI_func_drum_midi_note(uint8_t param) { } #else static bool display_name; + static bool store_flag; char tmp_val[4]; char tmp_name[9]; if (LCDML.FUNC_setup()) // ****** SETUP ********* { + store_flag = false; + if (!display_name) midi_learn_mode = MIDI_LEARN_MODE_NOTE; else @@ -4399,6 +4402,7 @@ void UI_func_drum_midi_note(uint8_t param) { if (display_name == true) { if (active_sample < NUM_DRUMSET_CONFIG - 2) active_sample++; + store_flag = true; } else { configuration.drums.midinote[active_sample] = constrain(configuration.drums.midinote[active_sample] + ENCODER[ENC_L].speed(), DRUMS_MIDI_NOTE_MIN, DRUMS_MIDI_NOTE_MAX); } @@ -4406,6 +4410,7 @@ void UI_func_drum_midi_note(uint8_t param) { if (display_name == true) { if (active_sample > 0) active_sample--; + store_flag = true; } else { configuration.drums.midinote[active_sample] = constrain(configuration.drums.midinote[active_sample] - ENCODER[ENC_L].speed(), DRUMS_MIDI_NOTE_MIN, DRUMS_MIDI_NOTE_MAX); } @@ -4433,6 +4438,10 @@ void UI_func_drum_midi_note(uint8_t param) { if (LCDML.FUNC_close()) // ****** STABLE END ********* { + if (store_flag == true) { + display.show(0, 0, LCD_cols, "Store changes?"); + display.show(1, 0, LCD_cols, "[NO] YES"); + } encoderDir[ENC_L].reset(); midi_learn_mode = MIDI_LEARN_MODE_OFF; }