From e59ea3636faa54492f2ca535f0cedc47f35f9e39 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Tue, 4 Jan 2022 11:00:45 +0100 Subject: [PATCH] Reduced chorus delaylines from 20.0ms to 15.0ms. Removed change_disp_sd(). --- MicroDexed.ino | 25 +------------------ UI.hpp | 68 -------------------------------------------------- config.h | 2 +- 3 files changed, 2 insertions(+), 93 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 81fefeb..a73c061 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -658,9 +658,6 @@ void setup() #endif // Start SD card -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif sd_card = check_sd_cards(); if (sd_card < 1) @@ -691,10 +688,6 @@ void setup() // Load initial Performance or the last used one initial_values(false); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif - // Initialize processor and memory measurements AudioProcessorUsageMaxReset(); AudioMemoryUsageMaxReset(); @@ -1430,13 +1423,8 @@ void handleProgramChange(byte inChannel, byte inProgram) if (checkMidiChannel(inChannel, instance_id)) { configuration.dexed[instance_id].voice = constrain(inProgram, 0, MAX_VOICES - 1); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[instance_id].bank, configuration.dexed[instance_id].voice, instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif + if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select)) { LCDML.OTHER_updateFunc(); @@ -2752,17 +2740,6 @@ void generate_version_string(char* buffer, uint8_t len) #endif } -#ifdef DISPLAY_LCD_SPI -void change_disp_sd(bool disp) -{ - if (sd_card > 0) - { - digitalWrite(sd_card, disp); - digitalWrite(U8X8_CS_PIN, !disp); - } -} -#endif - uint8_t check_sd_cards(void) { uint8_t ret = 0; diff --git a/UI.hpp b/UI.hpp index 899bc83..1bc76d9 100644 --- a/UI.hpp +++ b/UI.hpp @@ -87,10 +87,6 @@ uint8_t seq_active_function = 99; uint8_t activesample; #endif -#ifdef DISPLAY_LCD_SPI -extern void change_disp_sd(bool d); -#endif - #ifdef SGTL5000_AUDIO_ENHANCE #include "control_sgtl5000plus.h" extern AudioControlSGTL5000Plus sgtl5000; @@ -7565,13 +7561,7 @@ void UI_func_voice_select(uint8_t param) memset(g_bank_name[selected_instance_id], 0, BANK_NAME_LEN); bank_tmp = constrain(configuration.dexed[selected_instance_id].bank - ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); configuration.dexed[selected_instance_id].bank = bank_tmp; -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif break; case MENU_VOICE_SOUND: memset(g_voice_name[selected_instance_id], 0, VOICE_NAME_LEN); @@ -7588,14 +7578,7 @@ void UI_func_voice_select(uint8_t param) if (voice_tmp < 0) voice_tmp = MAX_VOICES + voice_tmp; configuration.dexed[selected_instance_id].voice = constrain(voice_tmp, 0, MAX_VOICES - 1); - -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif break; } } @@ -7603,39 +7586,20 @@ void UI_func_voice_select(uint8_t param) if (configuration.sys.favorites == 1) { locate_previous_favorite(); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif } else //only non-Favs if (configuration.sys.favorites == 2) { locate_previous_non_favorite(); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif //break; } else //random non-Favs if (configuration.sys.favorites == 3) { locate_random_non_favorite(); - -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif } } //end UP else if (LCDML.BT_checkDown()) @@ -7649,13 +7613,7 @@ void UI_func_voice_select(uint8_t param) memset(g_bank_name[selected_instance_id], 0, BANK_NAME_LEN); bank_tmp = constrain(configuration.dexed[selected_instance_id].bank + ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); configuration.dexed[selected_instance_id].bank = bank_tmp; -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif break; case MENU_VOICE_SOUND: memset(g_voice_name[selected_instance_id], 0, VOICE_NAME_LEN); @@ -7671,14 +7629,7 @@ void UI_func_voice_select(uint8_t param) voice_tmp = MAX_VOICES - 1; } configuration.dexed[selected_instance_id].voice = constrain(voice_tmp, 0, MAX_VOICES - 1); - -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif break; } } @@ -7687,39 +7638,20 @@ void UI_func_voice_select(uint8_t param) { locate_next_favorite(); - -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif //break; } else //only non-Favs if (configuration.sys.favorites == 2) { locate_next_non_favorite(); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif //break; } else //random non-Favs if (configuration.sys.favorites == 3) { locate_random_non_favorite(); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(false); -#endif load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); -#ifdef DISPLAY_LCD_SPI - change_disp_sd(true); -#endif } } diff --git a/config.h b/config.h index 1d6237a..8499de9 100644 --- a/config.h +++ b/config.h @@ -144,7 +144,7 @@ #endif // CHORUS parameters -#define MOD_DELAY_SAMPLE_BUFFER int32_t(TIME_MS2SAMPLES(20.0)) // 20.0 ms delay buffer. +#define MOD_DELAY_SAMPLE_BUFFER int32_t(TIME_MS2SAMPLES(15.0)) // 15.0 ms delay buffer. #define MOD_WAVEFORM WAVEFORM_TRIANGLE // WAVEFORM_SINE WAVEFORM_TRIANGLE WAVEFORM_SAWTOOTH WAVEFORM_SAWTOOTH_REVERSE #define MOD_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT #define MOD_FILTER_CUTOFF_HZ 2000