|
|
@ -76,39 +76,24 @@ 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 patchCord2(freeverb_r, freeverb_antialias_r); |
|
|
|
AudioConnection patchCord15(freeverb_r, freeverb_antialias_r); |
|
|
|
AudioConnection patchCord3(freeverb_l, freeverb_antialias_l); |
|
|
|
AudioConnection patchCord16(freeverb_l, freeverb_antialias_l); |
|
|
|
AudioConnection patchCord4(freeverb_antialias_r, 0, master_mixer_r, 3); |
|
|
|
AudioConnection patchCord2(freeverb_antialias_r, 0, master_mixer_r, 3); |
|
|
|
AudioConnection patchCord5(freeverb_antialias_l, 0, master_mixer_l, 3); |
|
|
|
AudioConnection patchCord3(freeverb_antialias_l, 0, master_mixer_l, 3); |
|
|
|
#endif |
|
|
|
#else |
|
|
|
AudioConnection patchCord6(master_mixer_r, volume_r); |
|
|
|
AudioConnection patchCord2(freeverb_r, 0, master_mixer_r, 3); |
|
|
|
AudioConnection patchCord7(master_mixer_l, volume_l); |
|
|
|
AudioConnection patchCord3(freeverb_l, 0, master_mixer_l, 3); |
|
|
|
AudioConnection patchCord8(volume_r, 0, stereo2mono, 0); |
|
|
|
#endif |
|
|
|
AudioConnection patchCord9(volume_l, 0, stereo2mono, 1); |
|
|
|
#endif |
|
|
|
AudioConnection patchCord10(stereo2mono, 0, master_peak_r, 0); |
|
|
|
AudioConnection patchCord4(master_mixer_r, volume_r); |
|
|
|
AudioConnection patchCord11(stereo2mono, 0, master_peak_l, 0); |
|
|
|
AudioConnection patchCord5(master_mixer_l, volume_l); |
|
|
|
|
|
|
|
AudioConnection patchCord6(volume_r, 0, stereo2mono, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord7(volume_l, 0, stereo2mono, 1); |
|
|
|
|
|
|
|
AudioConnection patchCord8(stereo2mono, 0, master_peak_r, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord9(stereo2mono, 0, master_peak_l, 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Outputs
|
|
|
|
// Outputs
|
|
|
|
#ifdef AUDIO_DEVICE_USB |
|
|
|
|
|
|
|
AudioOutputUSB usb1; |
|
|
|
|
|
|
|
AudioConnection patchCord10(stereo2mono, 0, usb1, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord11(stereo2mono, 1, usb1, 1); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined(TEENSY_AUDIO_BOARD) |
|
|
|
#if defined(TEENSY_AUDIO_BOARD) |
|
|
|
AudioOutputI2S i2s1; |
|
|
|
AudioOutputI2S i2s1; |
|
|
|
AudioConnection patchCord12(stereo2mono, 0, i2s1, 0); |
|
|
|
AudioConnection patchCord12(stereo2mono, 0, i2s1, 0); |
|
|
|
AudioConnection patchCord13(stereo2mono, 1, i2s1, 1); |
|
|
|
AudioConnection patchCord13(stereo2mono, 1, i2s1, 1); |
|
|
|
AudioControlSGTL5000 sgtl5000_1; |
|
|
|
AudioControlSGTL5000 sgtl5000_1; |
|
|
|
#ifdef SGTL5000_AUDIO_THRU |
|
|
|
|
|
|
|
AudioInputI2S i2s1in; |
|
|
|
|
|
|
|
AudioConnection patchCord17(i2s1in, 0, master_mixer_r, 2); |
|
|
|
|
|
|
|
AudioConnection patchCord18(i2s1in, 1, master_mixer_l, 2); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#elif defined (I2S_AUDIO_ONLY) |
|
|
|
#elif defined (I2S_AUDIO_ONLY) |
|
|
|
AudioOutputI2S i2s1; |
|
|
|
AudioOutputI2S i2s1; |
|
|
|
AudioConnection patchCord12(stereo2mono, 0, i2s1, 0); |
|
|
|
AudioConnection patchCord12(stereo2mono, 0, i2s1, 0); |
|
|
@ -128,11 +113,21 @@ AudioMixer4 invMixer; |
|
|
|
AudioConnection patchCord12(stereo2mono, 0, dacOut , 0); |
|
|
|
AudioConnection patchCord12(stereo2mono, 0, dacOut , 0); |
|
|
|
AudioConnection patchCord13(stereo2mono, 1, invMixer, 0); |
|
|
|
AudioConnection patchCord13(stereo2mono, 1, invMixer, 0); |
|
|
|
AudioConnection patchCord14(invMixer, 0, dacOut , 1); |
|
|
|
AudioConnection patchCord14(invMixer, 0, dacOut , 1); |
|
|
|
#else |
|
|
|
#elif defined(TEENSY_DAC) |
|
|
|
AudioOutputAnalogStereo dacOut; |
|
|
|
AudioOutputAnalogStereo dacOut; |
|
|
|
AudioConnection patchCord12(stereo2mono, 0, dacOut, 0); |
|
|
|
AudioConnection patchCord12(stereo2mono, 0, dacOut, 0); |
|
|
|
AudioConnection patchCord13(stereo2mono, 1, dacOut, 1); |
|
|
|
AudioConnection patchCord13(stereo2mono, 1, dacOut, 1); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef AUDIO_DEVICE_USB |
|
|
|
|
|
|
|
AudioOutputUSB usb1; |
|
|
|
|
|
|
|
AudioConnection patchCord15(stereo2mono, 0, usb1, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord16(stereo2mono, 1, usb1, 1); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef SGTL5000_AUDIO_THRU |
|
|
|
|
|
|
|
AudioInputI2S i2s1in; |
|
|
|
|
|
|
|
AudioConnection patchCord17(i2s1in, 0, master_mixer_r, 2); |
|
|
|
|
|
|
|
AudioConnection patchCord18(i2s1in, 1, master_mixer_l, 2); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Dynamic patching of MicroDexed objects
|
|
|
|
// Dynamic patching of MicroDexed objects
|
|
|
@ -358,6 +353,7 @@ void setup() |
|
|
|
Serial.println(instance_id, DEC); |
|
|
|
Serial.println(instance_id, DEC); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
create_audio_engine_chain(instance_id); |
|
|
|
create_audio_engine_chain(instance_id); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
#if defined(USE_FX) |
|
|
|