Adding a fixed biquad filter at the output of the modulated delay.

master
Holger Wirtz 5 years ago
parent 0d81191ade
commit d612830933
  1. 40
      MicroMDAEPiano.ino

@ -54,10 +54,12 @@ AudioMixer4 mixer_l;
AudioAmplifier volume_r; AudioAmplifier volume_r;
AudioAmplifier volume_l; AudioAmplifier volume_l;
AudioAmplifier inverter; AudioAmplifier inverter;
AudioMixer4 modchorus_fbk_mixer_r;
AudioMixer4 modchorus_fbk_mixer_l;
AudioEffectModulatedDelay modchorus_r; AudioEffectModulatedDelay modchorus_r;
AudioEffectModulatedDelay modchorus_l; AudioEffectModulatedDelay modchorus_l;
AudioMixer4 modchorus_fbk_mixer_r;
AudioMixer4 modchorus_fbk_mixer_l;
AudioFilterBiquad modchorus_filter_r;
AudioFilterBiquad modchorus_filter_l;
AudioSynthWaveform modulator; AudioSynthWaveform modulator;
AudioConnection patchCord0(queue_r, peak_r); AudioConnection patchCord0(queue_r, peak_r);
AudioConnection patchCord1(queue_l, peak_l); AudioConnection patchCord1(queue_l, peak_l);
@ -74,20 +76,22 @@ AudioConnection patchCord11(modulator, inverter);
AudioConnection patchCord12(inverter, 0, modchorus_l, 1); AudioConnection patchCord12(inverter, 0, modchorus_l, 1);
AudioConnection patchCord13(queue_r, 0, mixer_r, 0); AudioConnection patchCord13(queue_r, 0, mixer_r, 0);
AudioConnection patchCord14(queue_l, 0, mixer_l, 0); AudioConnection patchCord14(queue_l, 0, mixer_l, 0);
AudioConnection patchCord15(modchorus_r, 0, mixer_r, 2); AudioConnection patchCord15(modchorus_r, modchorus_filter_r);
AudioConnection patchCord16(modchorus_l, 0, mixer_l, 2); AudioConnection patchCord16(modchorus_l, modchorus_filter_l);
AudioConnection patchCord17(freeverb_r, 0, mixer_r, 1); AudioConnection patchCord17(modchorus_filter_r, 0, mixer_r, 2);
AudioConnection patchCord18(freeverb_l, 0, mixer_l, 1); AudioConnection patchCord18(modchorus_filter_l, 0, mixer_l, 2);
AudioConnection patchCord19(mixer_r, volume_r); AudioConnection patchCord19(freeverb_r, 0, mixer_r, 1);
AudioConnection patchCord20(mixer_l, volume_l); AudioConnection patchCord20(freeverb_l, 0, mixer_l, 1);
AudioConnection patchCord21(mixer_r, volume_r);
AudioConnection patchCord22(mixer_l, volume_l);
#ifdef USB_AUDIO #ifdef USB_AUDIO
AudioOutputUSB usb1; AudioOutputUSB usb1;
AudioConnection patchCord21(volume_r, 0, usb1, 0); AudioConnection patchCord23(volume_r, 0, usb1, 0);
AudioConnection patchCord22(volume_l, 0, usb1, 1); AudioConnection patchCord24(volume_l, 0, usb1, 1);
#endif #endif
AudioOutputI2S i2s1; AudioOutputI2S i2s1;
AudioConnection patchCord23(volume_r, 0, i2s1, 0); AudioConnection patchCord25(volume_r, 0, i2s1, 0);
AudioConnection patchCord24(volume_l, 0, i2s1, 1); AudioConnection patchCord26(volume_l, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1; AudioControlSGTL5000 sgtl5000_1;
// Objects // Objects
@ -248,6 +252,18 @@ void setup()
#endif #endif
modchorus_r.offset(15.0); modchorus_r.offset(15.0);
modchorus_l.offset(15.0); modchorus_l.offset(15.0);
// Butterworth filter, 12 db/octave
modchorus_filter_r.setLowpass(0, 6000, 0.707);
modchorus_filter_l.setLowpass(0, 6000, 0.707);
// Linkwitz-Riley filter, 48 dB/octave
//modchorus_filter_r.setLowpass(0, 6000, 0.54);
//modchorus_filter_r.setLowpass(1, 6000, 1.3);
//modchorus_filter_r.setLowpass(2, 6000, 0.54);
//modchorus_filter_r.setLowpass(3, 6000, 1.3);
//modchorus_filter_l.setLowpass(0, 6000, 0.54);
//modchorus_filter_l.setLowpass(1, 6000, 1.3);
//modchorus_filter_l.setLowpass(2, 6000, 0.54);
//modchorus_filter_l.setLowpass(3, 6000, 1.3);
modchorus_fbk_mixer_r.gain(0, 1.0); modchorus_fbk_mixer_r.gain(0, 1.0);
modchorus_fbk_mixer_l.gain(0, 1.0); modchorus_fbk_mixer_l.gain(0, 1.0);
modchorus_fbk_mixer_r.gain(1, 0.0); modchorus_fbk_mixer_r.gain(1, 0.0);

Loading…
Cancel
Save