From 952bc98c46c28ce5eb28d3239572acd0e90a7439 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Mon, 23 Mar 2020 14:10:56 +0100 Subject: [PATCH] Small fixes for initialization of configuration. --- MicroDexed.ino | 10 ++++++++++ config.h | 16 ++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index c2a4293..06dc45c 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -1424,12 +1424,16 @@ void check_configuration(void) configuration.dexed[instance_id].pb_step = constrain(configuration.dexed[instance_id].pb_step, PB_STEP_MIN, PB_STEP_MAX); configuration.dexed[instance_id].mw_range = constrain(configuration.dexed[instance_id].mw_range, MW_RANGE_MIN, MW_RANGE_MAX); configuration.dexed[instance_id].mw_assign = constrain(configuration.dexed[instance_id].mw_assign, MW_ASSIGN_MIN, MW_ASSIGN_MAX); + configuration.dexed[instance_id].mw_mode = constrain(configuration.dexed[instance_id].mw_mode, MW_MODE_MIN, MW_MODE_MAX); configuration.dexed[instance_id].fc_range = constrain(configuration.dexed[instance_id].fc_range, FC_RANGE_MIN, FC_RANGE_MAX); configuration.dexed[instance_id].fc_assign = constrain(configuration.dexed[instance_id].fc_assign, FC_ASSIGN_MIN, FC_ASSIGN_MAX); + configuration.dexed[instance_id].fc_mode = constrain(configuration.dexed[instance_id].fc_mode, FC_MODE_MIN, FC_MODE_MAX); configuration.dexed[instance_id].bc_range = constrain(configuration.dexed[instance_id].bc_range, BC_RANGE_MIN, BC_RANGE_MAX); configuration.dexed[instance_id].bc_assign = constrain(configuration.dexed[instance_id].bc_assign, BC_ASSIGN_MIN, BC_ASSIGN_MAX); + configuration.dexed[instance_id].bc_mode = constrain(configuration.dexed[instance_id].bc_mode, BC_MODE_MIN, BC_MODE_MAX); configuration.dexed[instance_id].at_range = constrain(configuration.dexed[instance_id].at_range, AT_RANGE_MIN, AT_RANGE_MAX); configuration.dexed[instance_id].at_assign = constrain(configuration.dexed[instance_id].at_assign, AT_ASSIGN_MIN, AT_ASSIGN_MAX); + configuration.dexed[instance_id].at_mode = constrain(configuration.dexed[instance_id].at_mode, AT_MODE_MIN, AT_MODE_MAX); configuration.dexed[instance_id].portamento_mode = constrain(configuration.dexed[instance_id].portamento_mode, PORTAMENTO_MODE_MIN, PORTAMENTO_MODE_MAX); configuration.dexed[instance_id].portamento_glissando = constrain(configuration.dexed[instance_id].portamento_glissando, PORTAMENTO_GLISSANDO_MIN, PORTAMENTO_GLISSANDO_MAX); configuration.dexed[instance_id].portamento_time = constrain(configuration.dexed[instance_id].portamento_time, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX); @@ -1491,18 +1495,24 @@ void init_configuration(void) configuration.dexed[instance_id].pb_step = PB_STEP_DEFAULT; configuration.dexed[instance_id].mw_range = MW_RANGE_DEFAULT; configuration.dexed[instance_id].mw_assign = MW_ASSIGN_DEFAULT; + configuration.dexed[instance_id].mw_mode = MW_MODE_DEFAULT; configuration.dexed[instance_id].fc_range = FC_RANGE_DEFAULT; configuration.dexed[instance_id].fc_assign = FC_ASSIGN_DEFAULT; + configuration.dexed[instance_id].fc_mode = FC_MODE_DEFAULT; configuration.dexed[instance_id].bc_range = BC_RANGE_DEFAULT; configuration.dexed[instance_id].bc_assign = BC_ASSIGN_DEFAULT; + configuration.dexed[instance_id].bc_mode = BC_MODE_DEFAULT; configuration.dexed[instance_id].at_range = AT_RANGE_DEFAULT; configuration.dexed[instance_id].at_assign = AT_ASSIGN_DEFAULT; + configuration.dexed[instance_id].at_mode = AT_MODE_DEFAULT; configuration.dexed[instance_id].portamento_mode = PORTAMENTO_MODE_DEFAULT; configuration.dexed[instance_id].portamento_glissando = PORTAMENTO_GLISSANDO_DEFAULT; configuration.dexed[instance_id].portamento_time = PORTAMENTO_TIME_DEFAULT; configuration.dexed[instance_id].op_enabled = OP_ENABLED_DEFAULT; MicroDexed[instance_id]->controllers.refresh(); } + + set_volume(configuration.vol, configuration.mono); eeprom_update(); } diff --git a/config.h b/config.h index 4c877f9..6ad72a0 100644 --- a/config.h +++ b/config.h @@ -75,6 +75,14 @@ #define SYSEXBANK_DEFAULT 0 #define SYSEXSOUND_DEFAULT 0 +//************************************************************************************************* +//* DEBUG OUTPUT SETTINGS +//************************************************************************************************* +#define DEBUG 1 +#define SERIAL_SPEED 230400 +#define SHOW_XRUN 1 +#define SHOW_CPU_LOAD_MSEC 5000 + //************************************************************************************************* //* DEXED AND EFECTS SETTINGS //************************************************************************************************* @@ -169,14 +177,6 @@ #define CONTROL_RATE_MS 30 #define BACK_FROM_VOLUME_MS 2000 -//************************************************************************************************* -//* DEBUG OUTPUT SETTINGS -//************************************************************************************************* -#define DEBUG 1 -#define SERIAL_SPEED 230400 -#define SHOW_XRUN 1 -#define SHOW_CPU_LOAD_MSEC 5000 - //************************************************************************************************* //* HARDWARE SETTINGS //*************************************************************************************************