Fixes for operator enable/disable.

pull/32/head
Holger Wirtz 5 years ago
parent ee4577abc4
commit 629c021e14
  1. 4
      MicroDexed.ino
  2. 28
      UI.hpp

@ -1381,11 +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]->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));

@ -434,9 +434,7 @@ void setup_ui(void)
lcd.init();
lcd.backlight();
lcd.clear();
lcd.blink_off();
lcd.cursor_off();
lcd.backlight();
lcd.noCursor();
#else
lcd.begin();
lcd.clear();
@ -3420,14 +3418,7 @@ void UI_handle_OP(uint8_t param)
lcd.print(F("Operator Enable"));
lcd.setCursor(0, 1);
for (uint8_t i = 2; i < 8; i++)
{
lcd.print(F(" "));
lcd.write(i);
}
lcd.setCursor(op_selected * 2, 1);
lcd.print(F("["));
lcd.setCursor(op_selected * 2 + 2, 1);
lcd.print(F("]"));
#if NUM_DEXED > 1
lcd.setCursor(15, 0);
@ -3435,12 +3426,13 @@ void UI_handle_OP(uint8_t param)
lcd.setCursor(15, 1);
lcd.write(1);
#endif
lcd.setCursor(op_selected, 1);
lcd.blink();
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
{
uint8_t op_selected_old = op_selected;
if (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())
{
#if NUM_DEXED>1
@ -3477,14 +3469,7 @@ void UI_handle_OP(uint8_t param)
lcd_OP_active_instance_number(selected_instance_id, configuration.dexed[selected_instance_id].op_enabled);
}
lcd.setCursor(op_selected_old * 2, 1);
lcd.print(F(" "));
lcd.setCursor(op_selected_old * 2 + 2, 1);
lcd.print(F(" "));
lcd.setCursor(op_selected * 2, 1);
lcd.print(F("["));
lcd.setCursor(op_selected * 2 + 2, 1);
lcd.print(F("]"));
lcd.setCursor(op_selected, 1);
MicroDexed[selected_instance_id]->setOPs(configuration.dexed[selected_instance_id].op_enabled);
MicroDexed[selected_instance_id]->doRefreshVoice();
@ -3492,6 +3477,9 @@ void UI_handle_OP(uint8_t param)
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
lcd.noCursor();
lcd_special_chars(SCROLLBAR);
encoderDir[ENC_R].reset();
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, dexed[0].op_enabled), configuration.dexed[0].op_enabled);
#if NUM_DEXED > 1

Loading…
Cancel
Save