cfredisded
Active member
I've been working on a project using the Teensy 4.0 and its audio board as an effects loops. I've recently run into a problem and spent the last week ruling out possible issues and boiled it down to what seems to be a bug in the audio library?
Here's an example of how the effects loop would work.
Right channel would be a dry signal and left channel would be the effected signal and then you can mix different amounts of each. It was working fine until i noticed there was still some dry signal coming through when it should be 100% wet. So I plugged it in like this
and only plugged in the right input and right output and noticed that even when there shouldn't be any signal on the right output there still is.
Here's the simplest sketch that reproduces this issue. It seems to happen with both the mixer library module and amp module, and i would be using the mixer module.
Library Module Setup 1
Sketch 1
There shouldn't be any audio getting to the right output but there still is a very quite but present signal if the amp.gains are set to 1? Changing either amp.gain to 0 and there is no more signal.
Library Module Setup 2
Sketch 2
Any help with this would be greatly appreciated. It would also help if someone can reproduce this just so I 100% no its not just something strange on my end. Thanks
Here's an example of how the effects loop would work.
Right channel would be a dry signal and left channel would be the effected signal and then you can mix different amounts of each. It was working fine until i noticed there was still some dry signal coming through when it should be 100% wet. So I plugged it in like this
and only plugged in the right input and right output and noticed that even when there shouldn't be any signal on the right output there still is.
Here's the simplest sketch that reproduces this issue. It seems to happen with both the mixer library module and amp module, and i would be using the mixer module.
Library Module Setup 1
Sketch 1
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=431,321
AudioAmplifier amp1; //xy=613,312
AudioAmplifier amp2; //xy=613,348
AudioOutputI2S i2s2; //xy=787,325
AudioConnection patchCord1(i2s1, 0, amp1, 0);
AudioConnection patchCord2(i2s1, 1, amp2, 0);
AudioConnection patchCord3(amp1, 0, i2s2, 1);
AudioConnection patchCord4(amp2, 0, i2s2, 0);
AudioControlSGTL5000 sgtl5000_1; //xy=433,256
// GUItool: end automatically generated code
const int myInput = AUDIO_INPUT_LINEIN;
void setup() {
// put your setup code here, to run once:
AudioMemory(250);
sgtl5000_1.enable();
sgtl5000_1.inputSelect(myInput);
sgtl5000_1.volume(1);
//sgtl5000_1.adcHighPassFilterDisable();
}
void loop() {
// put your main code here, to run repeatedly:
amp1.gain(1); //changing either of these to .gain(0); and there is no signal at right output
amp2.gain(1);
}
Library Module Setup 2
Sketch 2
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=430,313
AudioMixer4 mixer2; //xy=613,273
AudioMixer4 mixer1; //xy=615,366
AudioOutputI2S i2s2; //xy=782,311
AudioConnection patchCord1(i2s1, 0, mixer1, 0);
AudioConnection patchCord2(i2s1, 0, mixer2, 0);
AudioConnection patchCord3(i2s1, 1, mixer1, 1);
AudioConnection patchCord4(i2s1, 1, mixer2, 1);
AudioConnection patchCord5(mixer2, 0, i2s2, 0);
AudioConnection patchCord6(mixer1, 0, i2s2, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=433,256
// GUItool: end automatically generated code
const int myInput = AUDIO_INPUT_LINEIN;
void setup() {
// put your setup code here, to run once:
AudioMemory(250);
sgtl5000_1.enable();
sgtl5000_1.inputSelect(myInput);
sgtl5000_1.volume(1);
//sgtl5000_1.adcHighPassFilterDisable();
}
void loop() {
// put your main code here, to run repeatedly:
mixer1.gain(0,1); // left chann to right (audio shouldnt come through when this is set to 1)
mixer1.gain(1,0); // right chann to right
mixer2.gain(0,0); // left chann to left
mixer2.gain(1,1); // right chann to left (audio shouldnt come through when this is set to 1)
}