|
|
|
@ -1354,8 +1354,8 @@ void initial_values_from_eeprom(bool init) |
|
|
|
|
MicroDexed[instance_id]->doRefreshVoice(); |
|
|
|
|
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
chorus_mixer[instance_id]->gain(0, 1.0); |
|
|
|
|
chorus_mixer[instance_id]->gain(1, mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
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)); |
|
|
|
|
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_fb_mixer[instance_id]->gain(0, 1.0); |
|
|
|
@ -1654,8 +1654,8 @@ void set_fx_params(void) |
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
|
// CHORUS
|
|
|
|
|
chorus_mixer[instance_id]->gain(0, 1.0); |
|
|
|
|
chorus_mixer[instance_id]->gain(1, mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
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)); |
|
|
|
|
switch (configuration.fx.chorus_waveform[instance_id]) |
|
|
|
|
{ |
|
|
|
|
case 0: |
|
|
|
@ -1738,6 +1738,14 @@ void _softRestart(void) |
|
|
|
|
SCB_AIRCR = 0x05FA0004; //write value for restart
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
float pseudo_log_curve(float value, bool type) |
|
|
|
|
{ |
|
|
|
|
if (type == true) |
|
|
|
|
return (_pseudo_log * arm_sin_f32(value)); |
|
|
|
|
else |
|
|
|
|
return (_pseudo_log * arm_cos_f32(value)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
uint32_t crc32(byte * calc_start, uint16_t calc_bytes) // base code from https://www.arduino.cc/en/Tutorial/EEPROMCrc
|
|
|
|
|
{ |
|
|
|
|
const uint32_t crc_table[16] = |
|
|
|
|