From ee4577abc429758a8911be7d4999d5d503f19629 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Thu, 14 May 2020 13:22:52 +0200 Subject: [PATCH] Fixed inital delay setting bug. --- MicroDexed.ino | 18 ++++++++++++------ config.h | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 7c004ea..1011f6e 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -729,7 +729,7 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) break; case 105: // CC 105: delay time configuration.fx.delay_time[instance_id] = map(inValue, 0, 0x7f, DELAY_TIME_MIN, DELAY_TIME_MAX); - delay_fx[instance_id]->delay(0, constrain(configuration.fx.delay_time[instance_id] * 10, DELAY_TIME_MIN, DELAY_TIME_MAX)); + delay_fx[instance_id]->delay(0, constrain(configuration.fx.delay_time[instance_id] * 10, DELAY_TIME_MIN * 10, DELAY_TIME_MAX * 10)); if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_delay_time)) { LCDML.OTHER_updateFunc(); @@ -1360,11 +1360,13 @@ void initial_values_from_eeprom(bool init) Serial.println(F("Loading inital system data from EEPROM.")); #endif + eeprom_get_performance(); eeprom_get_sys(); eeprom_get_fx(); - eeprom_get_performance(); for (uint8_t i = 0; i < NUM_DEXED; i++) + { eeprom_get_dexed(i); + } #ifdef DEBUG show_configuration(); @@ -1379,12 +1381,11 @@ void initial_values_from_eeprom(bool init) MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign, configuration.dexed[instance_id].fc_mode); MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign, configuration.dexed[instance_id].bc_mode); MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign, configuration.dexed[instance_id].at_mode); - MicroDexed[instance_id]->controllers.refresh(); - MicroDexed[instance_id]->setOPs(configuration.dexed[instance_id].op_enabled); - MicroDexed[instance_id]->doRefreshVoice(); MicroDexed[instance_id]->setOPs(configuration.dexed[instance_id].op_enabled); MicroDexed[instance_id]->setMaxNotes(configuration.dexed[instance_id].polyphony); MicroDexed[instance_id]->setMonoMode(configuration.sys.mono); + MicroDexed[instance_id]->controllers.refresh(); + MicroDexed[instance_id]->doRefreshVoice(); #if defined(USE_FX) //chorus_mixer[instance_id]->gain(0, 1.0 - pseudo_log_curve(mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true)); @@ -1406,8 +1407,13 @@ void initial_values_from_eeprom(bool init) #endif dexed_level[instance_id]->gain(mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX)); + + set_voiceconfig_params(instance_id); } + set_sys_params(); + set_fx_params(); + set_volume(configuration.sys.vol, configuration.sys.mono); #ifdef DEBUG @@ -1724,7 +1730,7 @@ void set_fx_params(void) // DELAY delay_mixer[instance_id]->gain(0, 1.0); delay_mixer[instance_id]->gain(1, mapfloat(configuration.fx.delay_level[instance_id], DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); - delay_fx[instance_id]->delay(0, constrain(configuration.fx.delay_time[instance_id] * 10, DELAY_TIME_MIN, DELAY_TIME_MAX)); + delay_fx[instance_id]->delay(0, constrain(configuration.fx.delay_time[instance_id] * 10, DELAY_TIME_MIN * 10, DELAY_TIME_MAX * 10)); delay_fb_mixer[instance_id]->gain(0, 1.0); delay_fb_mixer[instance_id]->gain(1, mapfloat(configuration.fx.delay_feedback[instance_id], DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0)); diff --git a/config.h b/config.h index 08d0034..c3c9536 100644 --- a/config.h +++ b/config.h @@ -47,7 +47,7 @@ // amidi -p hw:2,0,0 -d -r /tmp/bkup1.syx // -#define VERSION "0.9.9e" +#define VERSION "0.9.9f" //************************************************************************************************* //* DEVICE SETTINGS