From 63762acd951af265a5f5a8490bb5de1412fba3b2 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Mon, 24 Jun 2019 07:18:23 +0200 Subject: [PATCH] Small fixes. --- MicroMDAEPiano.ino | 8 +++++--- config.h | 3 ++- utility/gen_xfade.sh | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/MicroMDAEPiano.ino b/MicroMDAEPiano.ino index d8aba98..293924a 100644 --- a/MicroMDAEPiano.ino +++ b/MicroMDAEPiano.ino @@ -76,9 +76,11 @@ AudioConnection patchCord14(freeverb_r, 0, mixer_r, 1); AudioConnection patchCord15(freeverb_l, 0, mixer_l, 1); AudioConnection patchCord16(mixer_r, volume_r); AudioConnection patchCord17(mixer_l, volume_l); +#ifdef USB_AUDIO AudioOutputUSB usb1; AudioConnection patchCord18(volume_r, 0, usb1, 0); AudioConnection patchCord19(volume_l, 0, usb1, 1); +#endif AudioOutputI2S i2s1; AudioConnection patchCord20(volume_r, 0, i2s1, 0); AudioConnection patchCord21(volume_l, 0, i2s1, 1); @@ -229,11 +231,11 @@ void setup() modulator.phase(0); modulator.offset(0.0); modulator_filter.setLowpass(0, CHORUS_MODULATOR_FILTER_FRQ, CHORUS_MODULATOR_FILTER_Q); - inverter.gain(-1.0); // change phase for second moduleated delay + inverter.gain(-1.0); // change phase for second modulated delay (faked stereo mode) // internal mixing of original signal(0), reverb(1) and chorus(2) - mixer_r.gain(VOL_MAIN, 0.4); - mixer_l.gain(VOL_MAIN, 0.4); + mixer_r.gain(VOL_MAIN, 0.5); + mixer_l.gain(VOL_MAIN, 0.5); mixer_r.gain(VOL_REVERB, 0.2); mixer_l.gain(VOL_REVERB, 0.2); mixer_r.gain(VOL_CHORUS, 0.2); diff --git a/config.h b/config.h index 6b39c84..c0bbabf 100644 --- a/config.h +++ b/config.h @@ -51,7 +51,6 @@ //* AUDIO SETTINGS //************************************************************************************************* -#define VOLUME 0.8 #define AUDIO_MEM 128 #define SAMPLE_RATE AUDIO_SAMPLE_RATE #define REDUCE_LOUDNESS 0 @@ -77,6 +76,8 @@ //* HARDWARE SETTINGS //************************************************************************************************* +#define USB_AUDIO 1 + // Teensy Audio Shield: /* Values for SGTL5000_LINEOUT_LEVEL 13: 3.16 Volts p-p diff --git a/utility/gen_xfade.sh b/utility/gen_xfade.sh index c6babc7..5f1260a 100755 --- a/utility/gen_xfade.sh +++ b/utility/gen_xfade.sh @@ -5,5 +5,5 @@ sed -i 's/PROGMEM//' mdaEPianoData.h sed -i 's/const//' mdaEPianoData.h gcc -o xfade_generator xfade_generator.c rm mdaEPianoData.h -./xfade_generator >../mdaEPianoData_xfade.h +./xfade_generator >../mdaEPianoDataXfade.h rm xfade_generator