From 8452f8c310d5b9447dfd85aaf0ea286acaf82533 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Tue, 28 Jul 2020 14:25:58 +0200 Subject: [PATCH] Fixing audio thru for SGTL5000 Teensy audio card. --- MicroDexed.ino | 43 ++++++++++++++---- config.h | 9 ++-- doc/manuals/Build-Manual.pdf | Bin 3323967 -> 3324158 bytes .../MicroDexed-User_Manual.md | 4 +- 4 files changed, 40 insertions(+), 16 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index f935b44..62166ce 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -73,6 +73,10 @@ AudioAmplifier volume_l; AudioEffectStereoMono stereo2mono; AudioAnalyzePeak master_peak_r; AudioAnalyzePeak master_peak_l; +#if defined(TEENSY_AUDIO_BOARD) && defined(SGTL5000_AUDIO_THRU) +AudioMixer4 audio_thru_mixer_r; +AudioMixer4 audio_thru_mixer_l; +#endif // Audio chain tail #if defined(USE_FX) @@ -98,8 +102,10 @@ AudioConnection patchCord11(stereo2mono, 0, master_peak_l, 0); // Outputs #if defined(TEENSY_AUDIO_BOARD) AudioOutputI2S i2s1; +#ifndef SGTL5000_AUDIO_THRU AudioConnection patchCord12(stereo2mono, 0, i2s1, 0); AudioConnection patchCord13(stereo2mono, 1, i2s1, 1); +#endif AudioControlSGTL5000 sgtl5000_1; #elif defined (I2S_AUDIO_ONLY) AudioOutputI2S i2s1; @@ -130,10 +136,15 @@ AudioOutputUSB usb1; AudioConnection patchCord15(stereo2mono, 0, usb1, 0); AudioConnection patchCord16(stereo2mono, 1, usb1, 1); #endif -#ifdef SGTL5000_AUDIO_THRU + +#if defined(TEENSY_AUDIO_BOARD) && defined(SGTL5000_AUDIO_THRU) AudioInputI2S i2s1in; -AudioConnection patchCord17(i2s1in, 0, master_mixer_r, 2); -AudioConnection patchCord18(i2s1in, 1, master_mixer_l, 2); +AudioConnection patchCord17(stereo2mono, 0, audio_thru_mixer_r, 0); +AudioConnection patchCord18(stereo2mono, 1, audio_thru_mixer_l, 0); +AudioConnection patchCord19(i2s1in, 0, audio_thru_mixer_r, 1); +AudioConnection patchCord20(i2s1in, 1, audio_thru_mixer_l, 1); +AudioConnection patchCord21(audio_thru_mixer_r, 0, i2s1, 0); +AudioConnection patchCord22(audio_thru_mixer_l, 0, i2s1, 1); #endif // @@ -301,6 +312,7 @@ void setup() sgtl5000_1.audioProcessorDisable(); sgtl5000_1.audioPostProcessorEnable(); #ifdef SGTL5000_AUDIO_THRU + sgtl5000_1.audioPreProcessorEnable(); sgtl5000_1.inputSelect(AUDIO_INPUT_LINEIN); sgtl5000_1.lineInLevel(5); sgtl5000_1.adcHighPassFilterEnable(); @@ -472,18 +484,29 @@ void setup() #else master_mixer_r.gain(0, 1.0); master_mixer_l.gain(0, 1.0); + master_mixer_r.gain(1, 0.0); + master_mixer_l.gain(1, 0.0); #endif + master_mixer_r.gain(2, 0.0); + master_mixer_l.gain(2, 0.0); + master_mixer_r.gain(3, 0.0); + master_mixer_l.gain(3, 0.0); + +#if defined(TEENSY_AUDIO_BOARD) && defined(SGTL5000_AUDIO_THRU) + audio_thru_mixer_r.gain(0, 1.0); // MD signal sum + audio_thru_mixer_l.gain(0, 1.0); // MD signal sum #ifdef TEENSY_AUDIO_BOARD -#ifdef SGTL5000_AUDIO_THRU - master_mixer_r.gain(2, 1.0); // I2S Input - master_mixer_l.gain(2, 1.0); // I2S Input + audio_thru_mixer_r.gain(1, 1.0); // I2S nput + audio_thru_mixer_l.gain(1, 1.0); // I2S input #else - master_mixer_r.gain(2, 0.0); // I2S Input - master_mixer_l.gain(2, 0.0); // I2S Input + audio_thru_mixer_r.gain(1, 0.0); + audio_thru_mixer_l.gain(1, 0.0); #endif + audio_thru_mixer_r.gain(2, 0.0); + audio_thru_mixer_l.gain(2, 0.0); + audio_thru_mixer_r.gain(3, 0.0); + audio_thru_mixer_l.gain(3, 0.0); #endif - master_mixer_r.gain(3, 0.0); - master_mixer_l.gain(3, 0.0); //AudioInterrupts(); diff --git a/config.h b/config.h index 03559f3..28aeb10 100644 --- a/config.h +++ b/config.h @@ -56,7 +56,7 @@ // sed -i.orig 's/^#define USB_MIDI_SYSEX_MAX 290/#define USB_MIDI_SYSEX_MAX 4104/' /usr/local/arduino-teensy/hardware/teensy/avr/cores/teensy3/usb_midi.h //#define USB_MIDI_SYSEX_MAX 4104 -#define VERSION "1.0.5" +#define VERSION "1.0.6" //************************************************************************************************* //* DEVICE SETTINGS @@ -116,9 +116,10 @@ // SGTL5000 #ifdef TEENSY_AUDIO_BOARD #define SGTL5000_AUDIO_ENHANCE 1 -#define SGTL5000_AUDIO_THRU 1 +//#define SGTL5000_AUDIO_THRU 1 #define SGTL5000_HEADPHONE_VOLUME 0.8 #endif + //************************************************************************************************* //* AUDIO SOFTWARE SETTINGS //************************************************************************************************* @@ -296,9 +297,9 @@ # endif # else # if F_CPU == 256000000 -# define MAX_NOTES 9 +# define MAX_NOTES 8 # elif F_CPU == 216000000 -# define MAX_NOTES 7 +# define MAX_NOTES 6 # else # define MAX_NOTES 5 # endif diff --git a/doc/manuals/Build-Manual.pdf b/doc/manuals/Build-Manual.pdf index 7e682332b31bca67f4f38ac5f814cd9b0bc09f83..e5bb8b83d8ee7a2fd853a4eff8faf583784cdb23 100644 GIT binary patch delta 4007 zcmZXX2{_g17st8E7E0D4+a$`;Z(mY|B5EE+QxvibEtW1NQomHT8d8~%Y7`R_#h8@- zGpHn5Mw?fi6@KKJuHp09J>bKdiw^S;lm9l9<%_Tsv1roTCZ z;}~OsAZGBLtvuHyGT0#?W{r`#!#oVZ5QIiaT7kABbf2uakbSa^8j z?)0;lb-8=YmRhjkM(R;tF+5YC`+gF`F-nQ@Kt}kjjTfX(rxSpbb6KytM z`p7!7$;K@4A|wqtXxfX0%kEfA{ha!#XR|yOOSV+RcabW<7sCv!X3k zPiM2iK+P62iGEAqW4-#zCiUi})}uusraQCxn&M-pGE`Z!D_BqCnT2ETvkfa(GZxuY#H^rsVt6oxEpHv}hTT~!i(2}>D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kYN5`%CCE}&< zMK7TCVq)yf@rO*Ng|y6%-7vU9k`wCM6(?y@NZ0c$u`ZGB>t6Rks&2bu!`PksE{?k1 z_uQZ-m2dXk1g zY2=ldMV-ne58V9HH#|v-eyw4opE|uWrmRfb+i1Uq)7F^S%Gx{~?T2jjmR`pa`69R#d;^796>5dc)3qm0BA0%ikTc#Kyf@} z@(E0;fTK*x!xNY_M?#5Fke<0LhYOMkXci_&rWlOqSsjkD zf?SFra7vKNkStWgGXth^g8Uxiew{l*q4ba7&zP*MG})uAa7_FKQG~z=l&?cEutN8! z7#94!{c!#uWGIq9G$>9W1lc2*z;OP2fDXq51BVhUjtl1qqX~lL&jRR3jN)isYfzGe zpMiWc&@MvQ1<+wQ!K(xg9cGKI{H^6azbf*S!kn#B1AF^okRQeXxrNebz)9?XIu z7boFNP>xqI20K8I7XvdCj4Lk&Iv8O7CKw6V1QTpR!S$s0Gb39MD*mw^_x;s_ON>J{ ze-oLG<;P^n3@zB0rf5oVBQOTXdKiQ!k3|LRad5z>;M_5Wg^MTX0zwc7)}s=d5KcNm zP>kR<;Rr>b1b_OW5U7MQgZB?UKZX#5EG6iIOvs{wsYYl79#USnKnKwt1{sv(cMEh3 z_Fo6Tw_g?{1W%?cMq+|4Knx~HxG^KEgjWdYXk2KJWw4YRxmZ6=xG2l8#Lt2FX^3Ti zK9Rq=gQF-TTok_X5KLeQVuaueO7s@U%mlZ80Yk5}rT_o{ diff --git a/doc/manuals/MicroDexed-User_Manual/MicroDexed-User_Manual.md b/doc/manuals/MicroDexed-User_Manual/MicroDexed-User_Manual.md index 20977ce..f6f8f0a 100644 --- a/doc/manuals/MicroDexed-User_Manual/MicroDexed-User_Manual.md +++ b/doc/manuals/MicroDexed-User_Manual/MicroDexed-User_Manual.md @@ -4,7 +4,7 @@ fontsize: 14pt geometry: a4paper,margin=2cm --- -![](../../images/Logo/MicroDexed_logo_1.5mm_black_rounded.svg) +![](../../images/Logo/MicroDexed_logo_black.svg) # MicroDexed User Manual @@ -37,7 +37,7 @@ For the original Dexed/msfa software take a look at [Dexed on Github](https://gi * Delay (mono, up to 500ms, with feedback) * Low-pass filter with resonance * Reverb (stereo) - * Resonant low-pass filter + * Resonant low-pass filter * Mono sound engine with panorama controller before reverb * Up to 20 voices of polyphony * Up to 100 banks of 32 voices can be stored on an SD card