Hi Forum,
(NOTE: All references to "Strat" refer to an electric guitar.)
Noob here trying to get a FFT from my Strat. My setup is a Teensy 4.1 with Audio Shield Rev.D. Strat is directly connected to Line In and Line Out is to my desktop speakers. With Part_2_04_Microphone_Check sketch with AUDIO_INPUT_LINEIN selected the Strat comes through loud & clear.
I loaded Part_3_02_Fourier_Transform and entered the requisite design in the Design Tool. Everything runs and sounds normal. In the design Tool I replaced the playSdWav object with an i2s2 input object:
Then commented the 4 references to playSdWav1:
Now when I press button0 for Line In I get terrible distortion from the Strat. Pressing button1 for the Guitar Sample the playback is still nice and clear. Interestingly button2 for the generated sine wave is also distorted so anyone should be able to duplicate this
Any suggestions would be greatly appreciated.
Thanks!,
RichardW
(NOTE: All references to "Strat" refer to an electric guitar.)
Noob here trying to get a FFT from my Strat. My setup is a Teensy 4.1 with Audio Shield Rev.D. Strat is directly connected to Line In and Line Out is to my desktop speakers. With Part_2_04_Microphone_Check sketch with AUDIO_INPUT_LINEIN selected the Strat comes through loud & clear.
I loaded Part_3_02_Fourier_Transform and entered the requisite design in the Design Tool. Everything runs and sounds normal. In the design Tool I replaced the playSdWav object with an i2s2 input object:
C++:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioPlayMemory playMem1; //xy=378.33331298828125,214
AudioInputI2S i2s2; //xy=379.3333282470703,135.3333282470703
AudioSynthWaveform waveform1; //xy=408.33331298828125,286
AudioMixer4 mixer1; //xy=663.3333129882812,187
AudioAnalyzeFFT1024 fft1024_1; //xy=885.3333129882812,270
AudioOutputI2S i2s1; //xy=894.3333129882812,147
AudioConnection patchCord1(playMem1, 0, mixer1, 2);
AudioConnection patchCord2(i2s2, 0, mixer1, 0);
AudioConnection patchCord3(i2s2, 1, mixer1, 1);
AudioConnection patchCord4(waveform1, 0, mixer1, 3);
AudioConnection patchCord5(mixer1, 0, i2s1, 0);
AudioConnection patchCord6(mixer1, 0, i2s1, 1);
AudioConnection patchCord7(mixer1, fft1024_1);
AudioControlSGTL5000 sgtl5000_1; //xy=178.33331298828125,470
// GUItool: end automatically generated code
Then commented the 4 references to playSdWav1:
C++:
//playSdWav1.play("SDTEST1.WAV");
// playSdWav1.play(filenames[fileNumber]);
//playSdWav1.stop();
//playSdWav1.stop();
Now when I press button0 for Line In I get terrible distortion from the Strat. Pressing button1 for the Guitar Sample the playback is still nice and clear. Interestingly button2 for the generated sine wave is also distorted so anyone should be able to duplicate this
Any suggestions would be greatly appreciated.
Thanks!,
RichardW