Peter DPM47
New member
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=254.9333267211914,136.93335056304932
AudioMixer4 mixer2; //xy=366.3999938964844,968.3999938964844
AudioEffectDelay delay3; //xy=577.3999938964844,970.3999938964844
AudioMixer4 mixer1; //xy=584.4000778198242,146.39999961853027
AudioEffectChorus chorus2; //xy=767.3999938964844,1011.3999938964844
AudioEffectDelay delay1; //xy=820.3999938964844,149.39999389648438
AudioAmplifier amp2; //xy=931.4000625610352,1010.400068283081
AudioEffectChorus chorus1; //xy=1006.4000015258789,196.40001106262207
AudioAmplifier amp1; //xy=1100.4000701904297,515.4000396728516
AudioMixer4 mixer3; //xy=1370.4000854492188,539.4000425338745
AudioEffectDelay Haas_5ms; //xy=1560.3999938964844,641.3999938964844
AudioOutputI2S is2_out; //xy=1772.3999938964844,470.3999938964844
AudioConnection patchCord1(i2s1, 0, mixer1, 0);
AudioConnection patchCord2(i2s1, 0, mixer2, 0);
AudioConnection patchCord3(mixer2, delay3);
AudioConnection patchCord4(delay3, 7, chorus2, 0);
AudioConnection patchCord5(mixer1, delay1);
AudioConnection patchCord6(chorus2, amp2);
AudioConnection patchCord7(delay1, 7, chorus1, 0);
AudioConnection patchCord8(amp2, 0, mixer3, 1);
AudioConnection patchCord9(amp2, 0, mixer1, 1);
AudioConnection patchCord10(chorus1, amp1);
AudioConnection patchCord11(amp1, 0, mixer2, 1);
AudioConnection patchCord12(amp1, 0, mixer3, 0);
AudioConnection patchCord13(amp1, 0, mixer1, 2);
AudioConnection patchCord14(mixer3, 0, is2_out, 0);
AudioConnection patchCord15(mixer3, Haas_5ms);
AudioConnection patchCord16(Haas_5ms, 7, is2_out, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=175.9333267211914,238.40006065368652
// GUItool: end automatically generated code
// GUItool: end automatically generated code
void setup() {
// put your setup code here, to run once
Serial.begin(9600); //opens the USB port and set Baud rate
AudioMemory(8);
sgtl5000_1.enable();
sgtl5000_1.volume(0.5);
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC);
sgtl5000_1.micGain(36);
delay(1000);
mixer1.gain(0, 0.5);
mixer1.gain(1, 0.5);
mixer2.gain(0, 0.5);
mixer2.gain(1, 0.5);
}
void loop() {
// put your main code here, to run repeatedly:
}
The above is what I have so far. My question is how do I proceed to understand this? I found the "Serial" function described in Arduino and setting the Baud rate would be a reasonable thing to do but I am not clear what the destination of the serial data is. Is it a Pseudo terminal?
My next concern is AudioMemory(8). Where is this function defined if that is what it is and how is it possible to systematically find where it is defined so that I do not need to ask again? I have found methods of setting the value but I am not at that point in the project. I would appreciate any assistance because I do not support the physics philosophy of "just calculate" and prefer to understand the source of what I am doing rather than stitching together some examples .
Peter
Hardware:
Teensy 4.1
Audio Shield 4.0
Unconnected because I have not yet received delivery of the header.