diff --git a/UI.hpp b/UI.hpp index 5214f6f..0208a02 100644 --- a/UI.hpp +++ b/UI.hpp @@ -602,27 +602,24 @@ void lcdml_menu_control(void) #endif encoderDir[ENC_R].ButtonLong(true); -#if NUM_DEXED > 1 if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select)) { - selected_instance_id = !selected_instance_id; - lcd_active_instance_number(selected_instance_id); + LCDML.BT_enter(); LCDML.OTHER_updateFunc(); LCDML.loop_menu(); + encoderDir[ENC_R].ButtonPressed(false); + encoderDir[ENC_R].ButtonLong(false); } else { -#endif if (LCDML.FUNC_getID() < 0xff) LCDML.FUNC_setGBAToLastFunc(); else LCDML.FUNC_setGBAToLastCursorPos(); LCDML.OTHER_jumpToFunc(UI_func_voice_select); -#if NUM_DEXED > 1 + encoderDir[ENC_R].reset(); } -#endif - encoderDir[ENC_R].reset(); } // LEFT @@ -2158,7 +2155,7 @@ void UI_func_mono_poly(uint8_t param) encoderDir[ENC_R].reset(); lcd.setCursor(0, 0); - lcd.print(F("Mono/Polyphonic")); + lcd.print(F("Mono/Poly")); lcd_active_instance_number(selected_instance_id); lcd.setCursor(14, 0); @@ -3034,7 +3031,6 @@ void UI_func_at_range(uint8_t param) if (LCDML.FUNC_close()) // ****** STABLE END ********* { - lcd_special_chars(SCROLLBAR); lcd_special_chars(SCROLLBAR); encoderDir[ENC_R].reset(); EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, dexed[0].at_range), configuration.dexed[0].at_range); @@ -3198,7 +3194,7 @@ void UI_func_portamento_mode(uint8_t param) encoderDir[ENC_R].reset(); lcd.setCursor(0, 0); - lcd.print(F("Portamento Mode")); + lcd.print(F("Port. Mode")); lcd_active_instance_number(selected_instance_id); lcd.setCursor(14, 0); @@ -3267,7 +3263,7 @@ void UI_func_portamento_glissando(uint8_t param) encoderDir[ENC_R].reset(); lcd.setCursor(0, 0); - lcd.print(F("Portam. Gliss.")); + lcd.print(F("Port. Gliss.")); lcd_active_instance_number(selected_instance_id); lcd.setCursor(14, 0); @@ -3330,7 +3326,7 @@ void UI_func_portamento_time(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Portam. Time", configuration.dexed[selected_instance_id].portamento_time, 1.0, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, true); + lcd_display_bar_int("Port. Time", configuration.dexed[selected_instance_id].portamento_time, 1.0, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, true); lcd_active_instance_number(selected_instance_id); lcd.setCursor(14, 0); @@ -3534,8 +3530,15 @@ void UI_func_velocity_level(uint8_t param) { encoderDir[ENC_R].reset(); + lcd_active_instance_number(selected_instance_id); lcd_special_chars(BLOCKBAR); + lcd_display_bar_int("Velocity Lvl", configuration.dexed[selected_instance_id].velocity_level, 1.0, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, true); + + lcd.setCursor(14, 0); + lcd.write(0); + lcd.setCursor(15, 0); + lcd.write(1); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -3547,6 +3550,17 @@ void UI_func_velocity_level(uint8_t param) else if (LCDML.BT_checkUp()) configuration.dexed[selected_instance_id].velocity_level = constrain(configuration.dexed[selected_instance_id].velocity_level - ENCODER[ENC_R].speed(), VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX); } +#if NUM_DEXED > 1 + else if (LCDML.BT_checkEnter()) + { + selected_instance_id = !selected_instance_id; + lcd_active_instance_number(selected_instance_id); + lcd.setCursor(14, 0); + lcd.write(0); + lcd.setCursor(15, 0); + lcd.write(1); + } +#endif lcd_display_bar_int("Velocity Lvl", configuration.dexed[selected_instance_id].velocity_level, 1.0, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, false); } @@ -3600,6 +3614,13 @@ void UI_func_eeprom_reset(uint8_t param) delay(MESSAGE_WAIT_TIME); _softRestart(); } + else + { + lcd.setCursor(0, 1); + lcd.print("Canceled."); + delay(MESSAGE_WAIT_TIME); + LCDML.FUNC_goBackToMenu(); + } } if (yesno == true) @@ -3618,7 +3639,7 @@ void UI_func_eeprom_reset(uint8_t param) if (LCDML.FUNC_close()) // ****** STABLE END ********* { lcd.setCursor(0, 1); - lcd.print("Canceled "); + lcd.print("Canceled."); delay(MESSAGE_WAIT_TIME); encoderDir[ENC_R].reset(); @@ -3659,7 +3680,7 @@ void UI_func_voice_select(uint8_t param) char bank_name[BANK_NAME_LEN]; char voice_name[VOICE_NAME_LEN]; - if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) + if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && (encoderDir[ENC_R].ButtonShort() || encoderDir[ENC_R].ButtonLong()))) { uint8_t bank_tmp; int8_t voice_tmp; @@ -3747,13 +3768,24 @@ void UI_func_voice_select(uint8_t param) break; } } - else if (LCDML.BT_checkEnter()) + else if (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonPressed()) { if (menu_voice_select == MENU_VOICE_BANK) menu_voice_select = MENU_VOICE_SOUND; else menu_voice_select = MENU_VOICE_BANK; } +#if NUM_DEXED > 1 + else if (LCDML.BT_checkEnter()) + { + selected_instance_id = !selected_instance_id; + lcd_active_instance_number(selected_instance_id); + lcd.setCursor(14, 0); + lcd.write(0); + lcd.setCursor(15, 0); + lcd.write(1); + } +#endif } if (strlen(g_bank_name[selected_instance_id]) > 0) @@ -4659,6 +4691,8 @@ void UI_func_save_voice(uint8_t param) if (LCDML.FUNC_close()) // ****** STABLE END ********* { + lcd_special_chars(SCROLLBAR); + if (mode < 0xff) { lcd.show(1, 0, 16, "Canceled."); diff --git a/UI_FX.h b/UI_FX.h index e2ed4de..5a1d4c1 100644 --- a/UI_FX.h +++ b/UI_FX.h @@ -25,6 +25,12 @@ #ifndef _UI_H_ #define _UI_H_ +boolean COND_hide() // hide a menu element +// ********************************************************************* +{ + return false; // hidden +} + LCDML_add(0, LCDML_0, 1, "Voice", NULL); LCDML_add(1, LCDML_0_1, 1, "Select", UI_func_voice_select); LCDML_add(2, LCDML_0_1, 2, "Audio", NULL); @@ -106,10 +112,11 @@ LCDML_add(77, LCDML_0_3_5, 1, "MIDI Recv Bank", UI_func_sysex_receive_bank); LCDML_add(78, LCDML_0_3_5, 2, "MIDI Snd Bank", UI_func_sysex_send_bank); LCDML_add(79, LCDML_0_3_5, 3, "MIDI Snd Voice", UI_func_sysex_send_voice); LCDML_add(80, LCDML_0, 4, "System", NULL); -LCDML_add(81, LCDML_0_4, 1, "Volume", UI_func_volume); -LCDML_add(82, LCDML_0_4, 2, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(83, LCDML_0_4, 3, "MIDI Soft THRU", UI_func_midi_soft_thru); -LCDML_add(84, LCDML_0_4, 4, "EEPROM Reset", UI_func_eeprom_reset); -LCDML_add(85, LCDML_0, 6, "Info", UI_func_information); +//LCDML_add(81, LCDML_0_4, 1, "Volume", UI_func_volume); +LCDML_add(81, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(82, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); +LCDML_add(83, LCDML_0_4, 3, "EEPROM Reset", UI_func_eeprom_reset); +LCDML_add(84, LCDML_0, 6, "Info", UI_func_information); +LCDML_addAdvanced(85, LCDML_0, 7, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default); #define _LCDML_DISP_cnt 85 #endif diff --git a/UI_NO_FX.h b/UI_NO_FX.h index 66c660c..08b8717 100644 --- a/UI_NO_FX.h +++ b/UI_NO_FX.h @@ -25,6 +25,12 @@ #ifndef _UI_H_ #define _UI_H_ +boolean COND_hide() // hide a menu element +// ********************************************************************* +{ + return false; // hidden +} + LCDML_add(0, LCDML_0, 1, "Voice", NULL); LCDML_add(1, LCDML_0_1, 1, "Select", UI_func_voice_select); LCDML_add(2, LCDML_0_1, 2, "Audio", NULL); @@ -82,11 +88,11 @@ LCDML_add(53, LCDML_0_2_4, 1, "MIDI Recv Bank", UI_func_sysex_receive_bank); LCDML_add(54, LCDML_0_2_4, 2, "MIDI Snd Bank", UI_func_sysex_send_bank); LCDML_add(55, LCDML_0_2_4, 3, "MIDI Snd Voice", UI_func_sysex_send_voice); LCDML_add(56, LCDML_0, 3, "System", NULL); -LCDML_add(57, LCDML_0_3, 1, "Volume", UI_func_volume); -LCDML_add(58, LCDML_0_3, 2, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(59, LCDML_0_3, 3, "MIDI Soft THRU", UI_func_midi_soft_thru); -LCDML_add(60, LCDML_0_3, 4, "EEPROM Reset", UI_func_eeprom_reset); -LCDML_add(61, LCDML_0, 4, "Info", UI_func_information); +LCDML_add(57, LCDML_0_3, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(58, LCDML_0_3, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); +LCDML_add(59, LCDML_0_3, 3, "EEPROM Reset", UI_func_eeprom_reset); +LCDML_add(60, LCDML_0, 4, "Info", UI_func_information); +LCDML_addAdvanced(61, LCDML_0, 5, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default); #define _LCDML_DISP_cnt 61 #endif diff --git a/config.h b/config.h index 25b1b7a..3ad362d 100644 --- a/config.h +++ b/config.h @@ -93,7 +93,7 @@ //************************************************************************************************* //* DEBUG OUTPUT SETTINGS //************************************************************************************************* -//#define DEBUG 1 +#define DEBUG 1 #define SERIAL_SPEED 230400 #define SHOW_XRUN 1 #define SHOW_CPU_LOAD_MSEC 5000 @@ -104,9 +104,9 @@ #define DEXED_ENGINE DEXED_ENGINE_MODERN // DEXED_ENGINE_MARKI // DEXED_ENGINE_OPL // Number of Dexed instances -#define NUM_DEXED 1 // 1 or 2 - nothing else! +#define NUM_DEXED 2 // 1 or 2 - nothing else! // FX-CHAIN ENABLE/DISABLE -#define USE_FX 1 +//#define USE_FX 1 // CHORUS parameters #define MOD_DELAY_SAMPLE_BUFFER int32_t(TIME_MS2SAMPLES(20.0)) // 20.0 ms delay buffer. #define MOD_WAVEFORM WAVEFORM_TRIANGLE // WAVEFORM_SINE WAVEFORM_TRIANGLE WAVEFORM_SAWTOOTH WAVEFORM_SAWTOOTH_REVERSE @@ -155,7 +155,11 @@ #define AUDIO_MEM 384 #endif #endif +#if NUM_DEXED > 1 +#define DELAY_MAX_TIME 250 +#else #define DELAY_MAX_TIME 500 +#endif #define SAMPLE_RATE 44100 //************************************************************************************************* diff --git a/doc/bin/.swo b/doc/bin/.swo deleted file mode 100644 index 7f00fec..0000000 Binary files a/doc/bin/.swo and /dev/null differ