diff --git a/MicroDexed.ino b/MicroDexed.ino index 975f9f0..fda6c18 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -63,6 +63,8 @@ AudioMixer4 reverb_mixer_r; AudioMixer4 reverb_mixer_l; AudioEffectFreeverb freeverb_r; AudioEffectFreeverb freeverb_l; +AudioFilterBiquad freeverb_antialias_r; +AudioFilterBiquad freeverb_antialias_l; #endif AudioMixer4 master_mixer_r; AudioMixer4 master_mixer_l; @@ -76,9 +78,16 @@ AudioAnalyzePeak master_peak_l; #if defined(USE_FX) AudioConnection patchCord0(reverb_mixer_r, freeverb_r); AudioConnection patchCord1(reverb_mixer_l, freeverb_l); +#if defined(REVERB_ANTIALIAS_FRQ) +AudioConnection patchCord15(freeverb_r, freeverb_antialias_r); +AudioConnection patchCord16(freeverb_l, freeverb_antialias_l); +AudioConnection patchCord2(freeverb_antialias_r, 0, master_mixer_r, 3); +AudioConnection patchCord3(freeverb_antialias_l, 0, master_mixer_l, 3); +#else AudioConnection patchCord2(freeverb_r, 0, master_mixer_r, 3); AudioConnection patchCord3(freeverb_l, 0, master_mixer_l, 3); #endif +#endif AudioConnection patchCord4(master_mixer_r, volume_r); AudioConnection patchCord5(master_mixer_l, volume_l); AudioConnection patchCord6(volume_r, 0, stereo2mono, 0); @@ -378,6 +387,17 @@ void setup() #endif #endif +#if defined(REVERB_ANTIALIAS_FRQ) + freeverb_antialias_r.setLowpass(0, REVERB_ANTIALIAS_FRQ, 0.54); + freeverb_antialias_r.setLowpass(1, REVERB_ANTIALIAS_FRQ, 1.3); + freeverb_antialias_r.setLowpass(2, REVERB_ANTIALIAS_FRQ, 0.54); + freeverb_antialias_r.setLowpass(3, REVERB_ANTIALIAS_FRQ, 1.3); + freeverb_antialias_l.setLowpass(0, REVERB_ANTIALIAS_FRQ, 0.54); + freeverb_antialias_l.setLowpass(1, REVERB_ANTIALIAS_FRQ, 1.3); + freeverb_antialias_l.setLowpass(2, REVERB_ANTIALIAS_FRQ, 0.54); + freeverb_antialias_l.setLowpass(3, REVERB_ANTIALIAS_FRQ, 1.3); +#endif + initial_values_from_eeprom(false); // start SD card @@ -1398,7 +1418,7 @@ void initial_values_from_eeprom(bool init) } check_configuration(); - + for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) { set_voiceconfig_params(instance_id); diff --git a/config.h b/config.h index 3484a18..9cf42b5 100644 --- a/config.h +++ b/config.h @@ -102,6 +102,7 @@ // FX-CHAIN ENABLE/DISABLE #define USE_FX 1 #define SGTL5000_AUDIO_ENHANCE 1 +#define REVERB_ANTIALIAS_FRQ 7500 //************************************************************************************************* //* AUDIO SOFTWARE SETTINGS