D
DeletedUser
Guest
Hi Folks,
I'm doing the initial bringup on a synth and a bug is bothering me. I want to sort it out before I proceed. I'm running Teensy 4.0 and an Audio Board Rev D.
The first thing I want to do is generate a sinewave and use a potentiometer to control the main output volume using sgtl5000.volume().
I noticed that I could never get the volume to go completely silent. I thought that maybe I had a mapping error, so I manually type sgtl5000.volume(0), but I still hear a sine wave.
Is this expected behavior, or do I have an interference problem inside my audio board?
Here is my example code. I hear a faint sinewave when I plug my open backed headphones into my audio board and run this program. Thank you for your help!
I'm doing the initial bringup on a synth and a bug is bothering me. I want to sort it out before I proceed. I'm running Teensy 4.0 and an Audio Board Rev D.
The first thing I want to do is generate a sinewave and use a potentiometer to control the main output volume using sgtl5000.volume().
I noticed that I could never get the volume to go completely silent. I thought that maybe I had a mapping error, so I manually type sgtl5000.volume(0), but I still hear a sine wave.
Is this expected behavior, or do I have an interference problem inside my audio board?
Here is my example code. I hear a faint sinewave when I plug my open backed headphones into my audio board and run this program. Thank you for your help!
Code:
// Synth Bringup
// Chris, Praj, and Stefan
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
// GUItool: begin automatically generated code
AudioSynthWaveform waveform1; //xy=92,164
AudioOutputI2S i2s1; //xy=332.5714111328125,164.57143592834473
AudioConnection patchCord1(waveform1, 0, i2s1, 0);
AudioConnection patchCord2(waveform1, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=171.71429443359375,261.71427059173584
// GUItool: end automatically generated code
//Main Output
float volumeFactor = 0.3;
float mainVolume = 1;
//hardware controls
int volumePin = A3;
void setup () {
AudioMemory(160);
//Serial.begin(115200);
sgtl5000_1.enable();
sgtl5000_1.volume(0);
waveform1.begin(1,880,WAVEFORM_SINE);
}
void loop () {
}