|
|
@ -207,7 +207,6 @@ char sd_string[LCD_cols + 1]; |
|
|
|
char g_voice_name[NUM_DEXED][VOICE_NAME_LEN]; |
|
|
|
char g_voice_name[NUM_DEXED][VOICE_NAME_LEN]; |
|
|
|
char g_bank_name[NUM_DEXED][BANK_NAME_LEN]; |
|
|
|
char g_bank_name[NUM_DEXED][BANK_NAME_LEN]; |
|
|
|
char receive_bank_filename[FILENAME_LEN]; |
|
|
|
char receive_bank_filename[FILENAME_LEN]; |
|
|
|
const float _pseudo_log = 1048575 / (float)(1 << 20); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
#if defined(USE_FX) |
|
|
|
// Allocate the delay lines for chorus
|
|
|
|
// Allocate the delay lines for chorus
|
|
|
@ -1354,8 +1353,10 @@ void initial_values_from_eeprom(bool init) |
|
|
|
MicroDexed[instance_id]->doRefreshVoice(); |
|
|
|
MicroDexed[instance_id]->doRefreshVoice(); |
|
|
|
|
|
|
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
#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)); |
|
|
|
//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));
|
|
|
|
chorus_mixer[instance_id]->gain(1, pseudo_log_curve(mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true)); |
|
|
|
//chorus_mixer[instance_id]->gain(1, pseudo_log_curve(mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true));
|
|
|
|
|
|
|
|
chorus_mixer[instance_id]->gain(0, 1.0 - mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5)); |
|
|
|
|
|
|
|
chorus_mixer[instance_id]->gain(1, mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5)); |
|
|
|
delay_mixer[instance_id]->gain(0, 1.0); |
|
|
|
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_mixer[instance_id]->gain(1, mapfloat(configuration.fx.delay_level[instance_id], DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
delay_fb_mixer[instance_id]->gain(0, 1.0); |
|
|
|
delay_fb_mixer[instance_id]->gain(0, 1.0); |
|
|
@ -1654,8 +1655,10 @@ void set_fx_params(void) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// CHORUS
|
|
|
|
// CHORUS
|
|
|
|
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)); |
|
|
|
//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));
|
|
|
|
chorus_mixer[instance_id]->gain(1, pseudo_log_curve(mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true)); |
|
|
|
//chorus_mixer[instance_id]->gain(1, pseudo_log_curve(mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true));
|
|
|
|
|
|
|
|
chorus_mixer[instance_id]->gain(0, 1.0 - mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5)); |
|
|
|
|
|
|
|
chorus_mixer[instance_id]->gain(1, mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5)); |
|
|
|
switch (configuration.fx.chorus_waveform[instance_id]) |
|
|
|
switch (configuration.fx.chorus_waveform[instance_id]) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case 0: |
|
|
|
case 0: |
|
|
@ -1673,7 +1676,7 @@ void set_fx_params(void) |
|
|
|
chorus_modulator[instance_id]->offset(0.0); |
|
|
|
chorus_modulator[instance_id]->offset(0.0); |
|
|
|
#if MOD_FILTER_OUTPUT == MOD_BUTTERWORTH_FILTER_OUTPUT |
|
|
|
#if MOD_FILTER_OUTPUT == MOD_BUTTERWORTH_FILTER_OUTPUT |
|
|
|
// Butterworth filter, 12 db/octave
|
|
|
|
// Butterworth filter, 12 db/octave
|
|
|
|
modchorus_filter[instance_id].setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.707); |
|
|
|
modchorus_filter[instance_id]->setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.707); |
|
|
|
#elif MOD_FILTER_OUTPUT == MOD_LINKWITZ_RILEY_FILTER_OUTPUT |
|
|
|
#elif MOD_FILTER_OUTPUT == MOD_LINKWITZ_RILEY_FILTER_OUTPUT |
|
|
|
// Linkwitz-Riley filter, 48 dB/octave
|
|
|
|
// Linkwitz-Riley filter, 48 dB/octave
|
|
|
|
modchorus_filter[instance_id]->setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.54); |
|
|
|
modchorus_filter[instance_id]->setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.54); |
|
|
@ -1740,6 +1743,8 @@ void _softRestart(void) |
|
|
|
|
|
|
|
|
|
|
|
float pseudo_log_curve(float value, bool type) |
|
|
|
float pseudo_log_curve(float value, bool type) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
const float _pseudo_log = 1048575 / (float)(1 << 20); |
|
|
|
|
|
|
|
|
|
|
|
if (type == true) |
|
|
|
if (type == true) |
|
|
|
return (_pseudo_log * arm_sin_f32(value)); |
|
|
|
return (_pseudo_log * arm_sin_f32(value)); |
|
|
|
else |
|
|
|
else |
|
|
|