Added Freeverb-Antialias-Filter

pull/32/head
Holger Wirtz 5 years ago
parent c53a30dcdd
commit d1ec88753e
  1. 22
      MicroDexed.ino
  2. 1
      config.h

@ -63,6 +63,8 @@ AudioMixer4 reverb_mixer_r;
AudioMixer4 reverb_mixer_l; AudioMixer4 reverb_mixer_l;
AudioEffectFreeverb freeverb_r; AudioEffectFreeverb freeverb_r;
AudioEffectFreeverb freeverb_l; AudioEffectFreeverb freeverb_l;
AudioFilterBiquad freeverb_antialias_r;
AudioFilterBiquad freeverb_antialias_l;
#endif #endif
AudioMixer4 master_mixer_r; AudioMixer4 master_mixer_r;
AudioMixer4 master_mixer_l; AudioMixer4 master_mixer_l;
@ -76,9 +78,16 @@ AudioAnalyzePeak master_peak_l;
#if defined(USE_FX) #if defined(USE_FX)
AudioConnection patchCord0(reverb_mixer_r, freeverb_r); AudioConnection patchCord0(reverb_mixer_r, freeverb_r);
AudioConnection patchCord1(reverb_mixer_l, freeverb_l); 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 patchCord2(freeverb_r, 0, master_mixer_r, 3);
AudioConnection patchCord3(freeverb_l, 0, master_mixer_l, 3); AudioConnection patchCord3(freeverb_l, 0, master_mixer_l, 3);
#endif #endif
#endif
AudioConnection patchCord4(master_mixer_r, volume_r); AudioConnection patchCord4(master_mixer_r, volume_r);
AudioConnection patchCord5(master_mixer_l, volume_l); AudioConnection patchCord5(master_mixer_l, volume_l);
AudioConnection patchCord6(volume_r, 0, stereo2mono, 0); AudioConnection patchCord6(volume_r, 0, stereo2mono, 0);
@ -378,6 +387,17 @@ void setup()
#endif #endif
#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); initial_values_from_eeprom(false);
// start SD card // start SD card
@ -1398,7 +1418,7 @@ void initial_values_from_eeprom(bool init)
} }
check_configuration(); check_configuration();
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{ {
set_voiceconfig_params(instance_id); set_voiceconfig_params(instance_id);

@ -102,6 +102,7 @@
// FX-CHAIN ENABLE/DISABLE // FX-CHAIN ENABLE/DISABLE
#define USE_FX 1 #define USE_FX 1
#define SGTL5000_AUDIO_ENHANCE 1 #define SGTL5000_AUDIO_ENHANCE 1
#define REVERB_ANTIALIAS_FRQ 7500
//************************************************************************************************* //*************************************************************************************************
//* AUDIO SOFTWARE SETTINGS //* AUDIO SOFTWARE SETTINGS

Loading…
Cancel
Save