Reduced chorus delaylines from 20.0ms to 15.0ms.

Removed change_disp_sd().
pull/112/head
Holger Wirtz 3 years ago
parent 4c9f5c4d9b
commit e59ea3636f
  1. 25
      MicroDexed.ino
  2. 68
      UI.hpp
  3. 2
      config.h

@ -658,9 +658,6 @@ void setup()
#endif #endif
// Start SD card // Start SD card
#ifdef DISPLAY_LCD_SPI
change_disp_sd(false);
#endif
sd_card = check_sd_cards(); sd_card = check_sd_cards();
if (sd_card < 1) if (sd_card < 1)
@ -691,10 +688,6 @@ void setup()
// Load initial Performance or the last used one // Load initial Performance or the last used one
initial_values(false); initial_values(false);
#ifdef DISPLAY_LCD_SPI
change_disp_sd(true);
#endif
// Initialize processor and memory measurements // Initialize processor and memory measurements
AudioProcessorUsageMaxReset(); AudioProcessorUsageMaxReset();
AudioMemoryUsageMaxReset(); AudioMemoryUsageMaxReset();
@ -1430,13 +1423,8 @@ void handleProgramChange(byte inChannel, byte inProgram)
if (checkMidiChannel(inChannel, instance_id)) if (checkMidiChannel(inChannel, instance_id))
{ {
configuration.dexed[instance_id].voice = constrain(inProgram, 0, MAX_VOICES - 1); 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); 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)) if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select))
{ {
LCDML.OTHER_updateFunc(); LCDML.OTHER_updateFunc();
@ -2752,17 +2740,6 @@ void generate_version_string(char* buffer, uint8_t len)
#endif #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 check_sd_cards(void)
{ {
uint8_t ret = 0; uint8_t ret = 0;

@ -87,10 +87,6 @@ uint8_t seq_active_function = 99;
uint8_t activesample; uint8_t activesample;
#endif #endif
#ifdef DISPLAY_LCD_SPI
extern void change_disp_sd(bool d);
#endif
#ifdef SGTL5000_AUDIO_ENHANCE #ifdef SGTL5000_AUDIO_ENHANCE
#include "control_sgtl5000plus.h" #include "control_sgtl5000plus.h"
extern AudioControlSGTL5000Plus sgtl5000; 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); 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); 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; 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); 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; break;
case MENU_VOICE_SOUND: case MENU_VOICE_SOUND:
memset(g_voice_name[selected_instance_id], 0, VOICE_NAME_LEN); 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) if (voice_tmp < 0)
voice_tmp = MAX_VOICES + voice_tmp; voice_tmp = MAX_VOICES + voice_tmp;
configuration.dexed[selected_instance_id].voice = constrain(voice_tmp, 0, 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); 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; break;
} }
} }
@ -7603,39 +7586,20 @@ void UI_func_voice_select(uint8_t param)
if (configuration.sys.favorites == 1) if (configuration.sys.favorites == 1)
{ {
locate_previous_favorite(); 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); 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 else //only non-Favs
if (configuration.sys.favorites == 2) if (configuration.sys.favorites == 2)
{ {
locate_previous_non_favorite(); 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); 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; //break;
} else //random non-Favs } else //random non-Favs
if (configuration.sys.favorites == 3) if (configuration.sys.favorites == 3)
{ {
locate_random_non_favorite(); 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); 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 } //end UP
else if (LCDML.BT_checkDown()) 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); 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); 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; 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); 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; break;
case MENU_VOICE_SOUND: case MENU_VOICE_SOUND:
memset(g_voice_name[selected_instance_id], 0, VOICE_NAME_LEN); 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; voice_tmp = MAX_VOICES - 1;
} }
configuration.dexed[selected_instance_id].voice = constrain(voice_tmp, 0, 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); 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; break;
} }
} }
@ -7687,39 +7638,20 @@ void UI_func_voice_select(uint8_t param)
{ {
locate_next_favorite(); 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); 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; //break;
} }
else //only non-Favs else //only non-Favs
if (configuration.sys.favorites == 2) if (configuration.sys.favorites == 2)
{ {
locate_next_non_favorite(); 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); 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; //break;
} else //random non-Favs } else //random non-Favs
if (configuration.sys.favorites == 3) if (configuration.sys.favorites == 3)
{ {
locate_random_non_favorite(); 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); 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
} }
} }

@ -144,7 +144,7 @@
#endif #endif
// CHORUS parameters // 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_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_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT
#define MOD_FILTER_CUTOFF_HZ 2000 #define MOD_FILTER_CUTOFF_HZ 2000

Loading…
Cancel
Save