|
|
@ -43,9 +43,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
AudioAnalyzePeak peak1; |
|
|
|
AudioAnalyzePeak peak1; |
|
|
|
|
|
|
|
|
|
|
|
AudioSourceMicroDexed microdexed1; |
|
|
|
|
|
|
|
//AudioPlayQueue queue1;
|
|
|
|
//AudioPlayQueue queue1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AudioSourceMicroDexed* MicroDexed[NUM_DEXED]; |
|
|
|
|
|
|
|
|
|
|
|
AudioEffectDelay delay1; |
|
|
|
AudioEffectDelay delay1; |
|
|
|
AudioEffectModulatedDelay modchorus; |
|
|
|
AudioEffectModulatedDelay modchorus; |
|
|
|
AudioSynthWaveform modulator; |
|
|
|
AudioSynthWaveform modulator; |
|
|
@ -58,11 +59,6 @@ AudioAmplifier volume_l; |
|
|
|
AudioOutputUSB usb1; |
|
|
|
AudioOutputUSB usb1; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
AudioEffectStereoMono stereomono1; |
|
|
|
AudioEffectStereoMono stereomono1; |
|
|
|
AudioConnection patchCord0(microdexed1, peak1); |
|
|
|
|
|
|
|
AudioConnection patchCord1(microdexed1, 0, delay_fb_mixer, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord2(microdexed1, 0, modchorus, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord3(microdexed1, 0 , master_mixer_r, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord4(microdexed1, 0 , master_mixer_l, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord5(modulator, 0, modchorus, 1); |
|
|
|
AudioConnection patchCord5(modulator, 0, modchorus, 1); |
|
|
|
#if MOD_FILTER_OUTPUT != MOD_NO_FILTER_OUTPUT |
|
|
|
#if MOD_FILTER_OUTPUT != MOD_NO_FILTER_OUTPUT |
|
|
|
AudioFilterBiquad modchorus_filter; |
|
|
|
AudioFilterBiquad modchorus_filter; |
|
|
@ -75,8 +71,6 @@ AudioConnection patchCord10(modchorus, 0, master_mixer_l, 3); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#if defined(USE_REVERB) |
|
|
|
#if defined(USE_REVERB) |
|
|
|
AudioEffectFreeverbStereo freeverbs1; |
|
|
|
AudioEffectFreeverbStereo freeverbs1; |
|
|
|
AudioConnection patchCord11(microdexed1, 0, freeverbs1, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord12(microdexed1, 0, freeverbs1, 1); |
|
|
|
|
|
|
|
AudioConnection patchCord13(freeverbs1, 0, master_mixer_r, 1); |
|
|
|
AudioConnection patchCord13(freeverbs1, 0, master_mixer_r, 1); |
|
|
|
AudioConnection patchCord14(freeverbs1, 1, master_mixer_l, 1); |
|
|
|
AudioConnection patchCord14(freeverbs1, 1, master_mixer_l, 1); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -123,7 +117,22 @@ AudioConnection patchCord36(stereomono1, 0, dacOut, 0); |
|
|
|
AudioConnection patchCord37(stereomono1, 1, dacOut, 1); |
|
|
|
AudioConnection patchCord37(stereomono1, 1, dacOut, 1); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
Dexed* MicroDexed[NUM_DEXED]; |
|
|
|
//Dexed* MicroDexed[NUM_DEXED];
|
|
|
|
|
|
|
|
AudioConnection * dynamicConnections[NUM_DEXED * 7]; |
|
|
|
|
|
|
|
int nDynamic = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void create_audio_connections(AudioSourceMicroDexed &d) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(d, peak1); |
|
|
|
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(d, 0, delay_fb_mixer, 0); |
|
|
|
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(d, 0, modchorus, 0); |
|
|
|
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(d, 0 , master_mixer_r, 0); |
|
|
|
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(d, 0 , master_mixer_l, 0); |
|
|
|
|
|
|
|
#if defined(USE_REVERB) |
|
|
|
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(d, 0, freeverbs1, 0); |
|
|
|
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(d, 0, freeverbs1, 1); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool sd_card_available = false; |
|
|
|
bool sd_card_available = false; |
|
|
|
|
|
|
|
|
|
|
@ -146,7 +155,7 @@ uint8_t active_voices = 0; |
|
|
|
#ifdef SHOW_CPU_LOAD_MSEC |
|
|
|
#ifdef SHOW_CPU_LOAD_MSEC |
|
|
|
elapsedMillis cpu_mem_millis; |
|
|
|
elapsedMillis cpu_mem_millis; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
uint32_t overload = 0; |
|
|
|
//uint32_t overload = 0;
|
|
|
|
uint32_t peak = 0; |
|
|
|
uint32_t peak = 0; |
|
|
|
|
|
|
|
|
|
|
|
config_t configuration; |
|
|
|
config_t configuration; |
|
|
@ -192,10 +201,10 @@ void setup() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Serial.print(F("Creating MicroDexed engine ")); |
|
|
|
Serial.print(F("Creating MicroDexed engine ")); |
|
|
|
Serial.println(i, DEC); |
|
|
|
Serial.println(i, DEC); |
|
|
|
MicroDexed[i] = new Dexed(SAMPLE_RATE); |
|
|
|
MicroDexed[i] = new AudioSourceMicroDexed(SAMPLE_RATE); |
|
|
|
|
|
|
|
create_audio_connections(*MicroDexed[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
microdexed1.setDexeds(NUM_DEXED, MicroDexed); |
|
|
|
//microdexed1.setDexeds(NUM_DEXED, MicroDexed);
|
|
|
|
delay(220); |
|
|
|
delay(220); |
|
|
|
|
|
|
|
|
|
|
|
Serial.println(F("MicroDexed based on https://github.com/asb2m10/dexed")); |
|
|
|
Serial.println(F("MicroDexed based on https://github.com/asb2m10/dexed")); |
|
|
@ -1154,11 +1163,11 @@ void show_cpu_and_mem_usage(void) |
|
|
|
Serial.print(F(" MEM MAX: ")); |
|
|
|
Serial.print(F(" MEM MAX: ")); |
|
|
|
Serial.print(AudioMemoryUsageMax(), DEC); |
|
|
|
Serial.print(AudioMemoryUsageMax(), DEC); |
|
|
|
Serial.print(F(" RENDER_TIME_MAX: ")); |
|
|
|
Serial.print(F(" RENDER_TIME_MAX: ")); |
|
|
|
Serial.print(microdexed1.render_time_max, DEC); |
|
|
|
Serial.print(MicroDexed[0]->render_time_max, DEC); |
|
|
|
Serial.print(F(" XRUN: ")); |
|
|
|
Serial.print(F(" XRUN: ")); |
|
|
|
Serial.print(microdexed1.xrun, DEC); |
|
|
|
Serial.print(MicroDexed[0]->xrun, DEC); |
|
|
|
Serial.print(F(" OVERLOAD: ")); |
|
|
|
Serial.print(F(" OVERLOAD: ")); |
|
|
|
Serial.print(overload, DEC); |
|
|
|
Serial.print(MicroDexed[0]->overload, DEC); |
|
|
|
Serial.print(F(" PEAK: ")); |
|
|
|
Serial.print(F(" PEAK: ")); |
|
|
|
Serial.print(peak, DEC); |
|
|
|
Serial.print(peak, DEC); |
|
|
|
Serial.print(F(" BLOCKSIZE: ")); |
|
|
|
Serial.print(F(" BLOCKSIZE: ")); |
|
|
@ -1168,7 +1177,7 @@ void show_cpu_and_mem_usage(void) |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
AudioProcessorUsageMaxReset(); |
|
|
|
AudioProcessorUsageMaxReset(); |
|
|
|
AudioMemoryUsageMaxReset(); |
|
|
|
AudioMemoryUsageMaxReset(); |
|
|
|
microdexed1.render_time_max = 0; |
|
|
|
MicroDexed[0]->render_time_max = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|