|
|
|
@ -218,6 +218,7 @@ char sd_string[LCD_cols + 1]; |
|
|
|
|
char g_voice_name[NUM_DEXED][VOICE_NAME_LEN]; |
|
|
|
|
char g_bank_name[NUM_DEXED][BANK_NAME_LEN]; |
|
|
|
|
char receive_bank_filename[FILENAME_LEN]; |
|
|
|
|
const float _pseudo_log = 1048575 / (float)(1 << 20); |
|
|
|
|
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
// Allocate the delay lines for chorus
|
|
|
|
@ -1399,10 +1400,10 @@ void initial_values_from_eeprom(bool init) |
|
|
|
|
Serial.println(F("OK, loaded!")); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
master_mixer_r.gain(DEXED, 1.0); |
|
|
|
|
master_mixer_l.gain(DEXED, 1.0); |
|
|
|
|
master_mixer_r.gain(CHORUS, mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(CHORUS, mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(DEXED, _pseudo_log * arm_sin_f32(1.0 - mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_l.gain(DEXED, _pseudo_log * arm_sin_f32(1.0 - mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_r.gain(CHORUS, _pseudo_log * arm_cos_f32(mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_l.gain(CHORUS, _pseudo_log * arm_cos_f32(mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_r.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(REVERB, mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
@ -1483,8 +1484,10 @@ void check_configuration(void) |
|
|
|
|
configuration.dexed[instance_id].op_enabled = constrain(configuration.dexed[instance_id].op_enabled, OP_ENABLED_MIN, OP_ENABLED_MAX); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
master_mixer_r.gain(CHORUS, mapfloat(configuration.fx.delay_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(CHORUS, mapfloat(configuration.fx.delay_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(DEXED, _pseudo_log * arm_sin_f32(1.0 - mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_l.gain(DEXED, _pseudo_log * arm_sin_f32(1.0 - mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_r.gain(CHORUS, _pseudo_log * arm_cos_f32(mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_l.gain(CHORUS, _pseudo_log * arm_cos_f32(mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_r.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(REVERB, mapfloat(configuration.fx.delay_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
@ -1690,8 +1693,10 @@ bool eeprom_get_performance() |
|
|
|
|
|
|
|
|
|
void set_fx_params(void) |
|
|
|
|
{ |
|
|
|
|
master_mixer_r.gain(CHORUS, mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(CHORUS, mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(DEXED, _pseudo_log * arm_sin_f32(1.0 - mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_l.gain(DEXED, _pseudo_log * arm_sin_f32(1.0 - mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_r.gain(CHORUS, _pseudo_log * arm_cos_f32(mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_l.gain(CHORUS, _pseudo_log * arm_cos_f32(mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); |
|
|
|
|
master_mixer_r.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(REVERB, mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|