Basic help - mixer, levels and peak

dimitre

Well-known member
Hello, I'm testing an audio project and would like to ask very basic questions:

I'm conneting a Korg Minilogue to Teensy Audio Line In, for now just trying to find the right gain without distortion.
I've put up a very simple sketch to listen input and plot peaks.
Code:
#include <Audio.h>

AudioAnalyzePeak         peak1;
AudioInputI2S            i2sInput;
AudioOutputI2S           i2sOutput;
AudioConnection          saida1(i2sInput, 0, i2sOutput, 0);
AudioConnection          saida2(i2sInput, 0, i2sOutput, 1);
AudioControlSGTL5000     audioShield;

void setup(void) {
	AudioMemory(8);
	audioShield.enable();
	audioShield.inputSelect(AUDIO_INPUT_LINEIN);
	audioShield.volume(0.5);
}

void loop() {
	if (peak1.available()) {
		Serial.println(peak1.read());
	}
}


Should I try to find the right gain, both in the instrument and audioShield.volume so the peaks aren't 1 or near, right?
I found I have to lower a lot the instrument gain like 25% to be OK.
Is there some way of lowering the line in gain? I suppose if I use a mixer after audioShield object it will already be clipping.

Thanks
 
Back
Top