Small fixes for initialization of configuration.

pull/32/head
Holger Wirtz 5 years ago
parent f6a90d8864
commit 952bc98c46
  1. 10
      MicroDexed.ino
  2. 16
      config.h

@ -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].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_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_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_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_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_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_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_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_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_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_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); 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].pb_step = PB_STEP_DEFAULT;
configuration.dexed[instance_id].mw_range = MW_RANGE_DEFAULT; configuration.dexed[instance_id].mw_range = MW_RANGE_DEFAULT;
configuration.dexed[instance_id].mw_assign = MW_ASSIGN_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_range = FC_RANGE_DEFAULT;
configuration.dexed[instance_id].fc_assign = FC_ASSIGN_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_range = BC_RANGE_DEFAULT;
configuration.dexed[instance_id].bc_assign = BC_ASSIGN_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_range = AT_RANGE_DEFAULT;
configuration.dexed[instance_id].at_assign = AT_ASSIGN_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_mode = PORTAMENTO_MODE_DEFAULT;
configuration.dexed[instance_id].portamento_glissando = PORTAMENTO_GLISSANDO_DEFAULT; configuration.dexed[instance_id].portamento_glissando = PORTAMENTO_GLISSANDO_DEFAULT;
configuration.dexed[instance_id].portamento_time = PORTAMENTO_TIME_DEFAULT; configuration.dexed[instance_id].portamento_time = PORTAMENTO_TIME_DEFAULT;
configuration.dexed[instance_id].op_enabled = OP_ENABLED_DEFAULT; configuration.dexed[instance_id].op_enabled = OP_ENABLED_DEFAULT;
MicroDexed[instance_id]->controllers.refresh(); MicroDexed[instance_id]->controllers.refresh();
} }
set_volume(configuration.vol, configuration.mono);
eeprom_update(); eeprom_update();
} }

@ -75,6 +75,14 @@
#define SYSEXBANK_DEFAULT 0 #define SYSEXBANK_DEFAULT 0
#define SYSEXSOUND_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 //* DEXED AND EFECTS SETTINGS
//************************************************************************************************* //*************************************************************************************************
@ -169,14 +177,6 @@
#define CONTROL_RATE_MS 30 #define CONTROL_RATE_MS 30
#define BACK_FROM_VOLUME_MS 2000 #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 //* HARDWARE SETTINGS
//************************************************************************************************* //*************************************************************************************************

Loading…
Cancel
Save