Using AudioEffectAnalogChorus from BALibrary (branch feature/AudioEffectAnalogChorus).

master
Holger Wirtz 6 years ago
parent f11f9fd43d
commit 7e4d2f306d
  1. 24
      BA_MicroMDAEPiano.ino
  2. 4
      config.h

@ -29,6 +29,7 @@
#include <EEPROM.h> #include <EEPROM.h>
#include <limits.h> #include <limits.h>
#include <BALibrary.h> #include <BALibrary.h>
#include <BAEffects.h>
#include "mdaEPiano.h" #include "mdaEPiano.h"
#ifdef USE_XFADE_DATA #ifdef USE_XFADE_DATA
#include "mdaEPianoDataXfade.h" #include "mdaEPianoDataXfade.h"
@ -43,6 +44,7 @@
#endif #endif
using namespace BALibrary; using namespace BALibrary;
using namespace BAEffects;
//************************************************************************************************* //*************************************************************************************************
//* GLOBAL VARIABLES //* GLOBAL VARIABLES
@ -53,14 +55,18 @@ AudioPlayQueue queue_r;
AudioPlayQueue queue_l; AudioPlayQueue queue_l;
AudioAnalyzePeak peak_r; AudioAnalyzePeak peak_r;
AudioAnalyzePeak peak_l; AudioAnalyzePeak peak_l;
AudioEffectAnalogChorus analogChorus_r;
AudioEffectAnalogChorus analogChorus_l;
AudioEffectFreeverb freeverb_r; AudioEffectFreeverb freeverb_r;
AudioEffectFreeverb freeverb_l; AudioEffectFreeverb freeverb_l;
AudioMixer4 mixer_r; AudioMixer4 mixer_r;
AudioMixer4 mixer_l; AudioMixer4 mixer_l;
AudioConnection patchCord0(queue_r, peak_r); AudioConnection patchCord0(queue_r, peak_r);
AudioConnection patchCord1(queue_l, peak_l); AudioConnection patchCord1(queue_l, peak_l);
AudioConnection patchCord4(queue_r, freeverb_r); AudioConnection patchCord2(queue_r, analogChorus_r);
AudioConnection patchCord5(queue_l, freeverb_l); AudioConnection patchCord3(queue_l, analogChorus_l);
AudioConnection patchCord4(analogChorus_r, freeverb_r);
AudioConnection patchCord5(analogChorus_l, freeverb_l);
AudioConnection patchCord6(queue_r, 0, mixer_r, 0); AudioConnection patchCord6(queue_r, 0, mixer_r, 0);
AudioConnection patchCord7(queue_l, 0, mixer_l, 0); AudioConnection patchCord7(queue_l, 0, mixer_l, 0);
AudioConnection patchCord8(freeverb_r, 0, mixer_r, 1); AudioConnection patchCord8(freeverb_r, 0, mixer_r, 1);
@ -112,7 +118,7 @@ uint32_t xrun = 0;
uint32_t overload = 0; uint32_t overload = 0;
uint32_t peak = 0; uint32_t peak = 0;
uint16_t render_time_max = 0; uint16_t render_time_max = 0;
float vol = VOLUME; float vol = XVOLUME;
float vol_right = 1.0; float vol_right = 1.0;
float vol_left = 1.0; float vol_left = 1.0;
elapsedMicros fill_audio_buffer; elapsedMicros fill_audio_buffer;
@ -238,6 +244,18 @@ void setup()
freeverb_l.roomsize(0.2); freeverb_l.roomsize(0.2);
freeverb_r.damping(0.5); freeverb_r.damping(0.5);
freeverb_l.damping(0.5); freeverb_l.damping(0.5);
analogChorus_r.enable();
analogChorus_r.bypass(false);
analogChorus_r.rate(0.5f);
analogChorus_r.mix(0.5f);
analogChorus_r.depth(1.0f);
analogChorus_l.enable();
analogChorus_l.bypass(false);
analogChorus_l.rate(0.5f);
analogChorus_l.mix(0.5f);
analogChorus_l.depth(1.0f);
mixer_r.gain(0, 0.7); mixer_r.gain(0, 0.7);
mixer_l.gain(0, 0.7); mixer_l.gain(0, 0.7);
mixer_r.gain(1, 0.3); mixer_r.gain(1, 0.3);

@ -40,7 +40,7 @@
// AUDIO // AUDIO
//#define TEENSY_AUDIO_BOARD 1 //#define TEENSY_AUDIO_BOARD 1
#define TGA_BOARD //#define TGA_BOARD
//************************************************************************************************* //*************************************************************************************************
//* MIDI SETTINGS //* MIDI SETTINGS
@ -53,7 +53,7 @@
//* AUDIO SETTINGS //* AUDIO SETTINGS
//************************************************************************************************* //*************************************************************************************************
#define VOLUME 0.8 #define XVOLUME 0.8
#define AUDIO_MEM 128 #define AUDIO_MEM 128
#define SAMPLE_RATE 44100 #define SAMPLE_RATE 44100
#define REDUCE_LOUDNESS 0 #define REDUCE_LOUDNESS 0

Loading…
Cancel
Save