Fixing audio thru for SGTL5000 Teensy audio card.

pull/32/head
Holger Wirtz 4 years ago
parent ee5e7ab6db
commit 8452f8c310
  1. 43
      MicroDexed.ino
  2. 9
      config.h
  3. BIN
      doc/manuals/Build-Manual.pdf
  4. 4
      doc/manuals/MicroDexed-User_Manual/MicroDexed-User_Manual.md

@ -73,6 +73,10 @@ AudioAmplifier volume_l;
AudioEffectStereoMono stereo2mono; AudioEffectStereoMono stereo2mono;
AudioAnalyzePeak master_peak_r; AudioAnalyzePeak master_peak_r;
AudioAnalyzePeak master_peak_l; 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 // Audio chain tail
#if defined(USE_FX) #if defined(USE_FX)
@ -98,8 +102,10 @@ AudioConnection patchCord11(stereo2mono, 0, master_peak_l, 0);
// Outputs // Outputs
#if defined(TEENSY_AUDIO_BOARD) #if defined(TEENSY_AUDIO_BOARD)
AudioOutputI2S i2s1; AudioOutputI2S i2s1;
#ifndef SGTL5000_AUDIO_THRU
AudioConnection patchCord12(stereo2mono, 0, i2s1, 0); AudioConnection patchCord12(stereo2mono, 0, i2s1, 0);
AudioConnection patchCord13(stereo2mono, 1, i2s1, 1); AudioConnection patchCord13(stereo2mono, 1, i2s1, 1);
#endif
AudioControlSGTL5000 sgtl5000_1; AudioControlSGTL5000 sgtl5000_1;
#elif defined (I2S_AUDIO_ONLY) #elif defined (I2S_AUDIO_ONLY)
AudioOutputI2S i2s1; AudioOutputI2S i2s1;
@ -130,10 +136,15 @@ AudioOutputUSB usb1;
AudioConnection patchCord15(stereo2mono, 0, usb1, 0); AudioConnection patchCord15(stereo2mono, 0, usb1, 0);
AudioConnection patchCord16(stereo2mono, 1, usb1, 1); AudioConnection patchCord16(stereo2mono, 1, usb1, 1);
#endif #endif
#ifdef SGTL5000_AUDIO_THRU
#if defined(TEENSY_AUDIO_BOARD) && defined(SGTL5000_AUDIO_THRU)
AudioInputI2S i2s1in; AudioInputI2S i2s1in;
AudioConnection patchCord17(i2s1in, 0, master_mixer_r, 2); AudioConnection patchCord17(stereo2mono, 0, audio_thru_mixer_r, 0);
AudioConnection patchCord18(i2s1in, 1, master_mixer_l, 2); 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 #endif
// //
@ -301,6 +312,7 @@ void setup()
sgtl5000_1.audioProcessorDisable(); sgtl5000_1.audioProcessorDisable();
sgtl5000_1.audioPostProcessorEnable(); sgtl5000_1.audioPostProcessorEnable();
#ifdef SGTL5000_AUDIO_THRU #ifdef SGTL5000_AUDIO_THRU
sgtl5000_1.audioPreProcessorEnable();
sgtl5000_1.inputSelect(AUDIO_INPUT_LINEIN); sgtl5000_1.inputSelect(AUDIO_INPUT_LINEIN);
sgtl5000_1.lineInLevel(5); sgtl5000_1.lineInLevel(5);
sgtl5000_1.adcHighPassFilterEnable(); sgtl5000_1.adcHighPassFilterEnable();
@ -472,18 +484,29 @@ void setup()
#else #else
master_mixer_r.gain(0, 1.0); master_mixer_r.gain(0, 1.0);
master_mixer_l.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 #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 TEENSY_AUDIO_BOARD
#ifdef SGTL5000_AUDIO_THRU audio_thru_mixer_r.gain(1, 1.0); // I2S nput
master_mixer_r.gain(2, 1.0); // I2S Input audio_thru_mixer_l.gain(1, 1.0); // I2S input
master_mixer_l.gain(2, 1.0); // I2S Input
#else #else
master_mixer_r.gain(2, 0.0); // I2S Input audio_thru_mixer_r.gain(1, 0.0);
master_mixer_l.gain(2, 0.0); // I2S Input audio_thru_mixer_l.gain(1, 0.0);
#endif #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 #endif
master_mixer_r.gain(3, 0.0);
master_mixer_l.gain(3, 0.0);
//AudioInterrupts(); //AudioInterrupts();

@ -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 // 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 USB_MIDI_SYSEX_MAX 4104
#define VERSION "1.0.5" #define VERSION "1.0.6"
//************************************************************************************************* //*************************************************************************************************
//* DEVICE SETTINGS //* DEVICE SETTINGS
@ -116,9 +116,10 @@
// SGTL5000 // SGTL5000
#ifdef TEENSY_AUDIO_BOARD #ifdef TEENSY_AUDIO_BOARD
#define SGTL5000_AUDIO_ENHANCE 1 #define SGTL5000_AUDIO_ENHANCE 1
#define SGTL5000_AUDIO_THRU 1 //#define SGTL5000_AUDIO_THRU 1
#define SGTL5000_HEADPHONE_VOLUME 0.8 #define SGTL5000_HEADPHONE_VOLUME 0.8
#endif #endif
//************************************************************************************************* //*************************************************************************************************
//* AUDIO SOFTWARE SETTINGS //* AUDIO SOFTWARE SETTINGS
//************************************************************************************************* //*************************************************************************************************
@ -296,9 +297,9 @@
# endif # endif
# else # else
# if F_CPU == 256000000 # if F_CPU == 256000000
# define MAX_NOTES 9 # define MAX_NOTES 8
# elif F_CPU == 216000000 # elif F_CPU == 216000000
# define MAX_NOTES 7 # define MAX_NOTES 6
# else # else
# define MAX_NOTES 5 # define MAX_NOTES 5
# endif # endif

Binary file not shown.

@ -4,7 +4,7 @@ fontsize: 14pt
geometry: a4paper,margin=2cm geometry: a4paper,margin=2cm
--- ---
![](../../images/Logo/MicroDexed_logo_1.5mm_black_rounded.svg) ![](../../images/Logo/MicroDexed_logo_black.svg)
# MicroDexed User Manual # 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) * Delay (mono, up to 500ms, with feedback)
* Low-pass filter with resonance * Low-pass filter with resonance
* Reverb (stereo) * Reverb (stereo)
* Resonant low-pass filter * Resonant low-pass filter
* Mono sound engine with panorama controller before reverb * Mono sound engine with panorama controller before reverb
* Up to 20 voices of polyphony * Up to 20 voices of polyphony
* Up to 100 banks of 32 voices can be stored on an SD card * Up to 100 banks of 32 voices can be stored on an SD card

Loading…
Cancel
Save