@@ -28,8 +28,7 @@ void setup() { | |||
AudioMemory(6); | |||
audioShield.enable(); | |||
audioShield.inputSelect(myInput); | |||
audioShield.volume(0.75); | |||
audioShield.unmuteLineout(); | |||
audioShield.volume(0.5); | |||
Serial.begin(9600); | |||
} | |||
@@ -39,8 +39,7 @@ void setup() { | |||
// Enable the audio shield, select the input and set the output volume. | |||
audioShield.enable(); | |||
audioShield.inputSelect(myInput); | |||
audioShield.volume(0.75); | |||
audioShield.unmuteLineout(); | |||
audioShield.volume(0.5); | |||
calcBiquad(FILTER_PARAEQ,110,0,0.2,2147483648,44100,updateFilter); | |||
filterTone_L.updateCoefs(updateFilter); // default set updateCoefs(0,updateFilter); |
@@ -135,10 +135,6 @@ void setup() { | |||
l_myEffect.voices(0); | |||
r_myEffect.voices(0); | |||
// I want output on the line out too | |||
audioShield.unmuteLineout(); | |||
// audioShield.muteHeadphone(); | |||
Serial.println("setup done"); | |||
AudioProcessorUsageMaxReset(); | |||
AudioMemoryUsageMaxReset(); |
@@ -104,7 +104,7 @@ void setup() { | |||
audioShield.enable(); | |||
audioShield.inputSelect(myInput); | |||
audioShield.volume(0.65); | |||
audioShield.volume(0.5); | |||
// Warn that the passthru pin is grounded | |||
if(!digitalRead(PASSTHRU_PIN)) { | |||
@@ -125,9 +125,6 @@ void setup() { | |||
// PASSTHRU button is pushed. | |||
l_myEffect.voices(FLANGE_DELAY_PASSTHRU,0,0); | |||
r_myEffect.voices(FLANGE_DELAY_PASSTHRU,0,0); | |||
// I want output on the line out too | |||
audioShield.unmuteLineout(); | |||
Serial.println("setup done"); | |||
AudioProcessorUsageMaxReset(); |
@@ -4,6 +4,7 @@ This example code is in the public domain | |||
*/ | |||
#include <Audio.h> | |||
#include <Wire.h> | |||
#include <SPI.h> | |||
#include <SD.h> | |||
const int myInput = AUDIO_INPUT_LINEIN; | |||
@@ -30,9 +31,8 @@ void setup() { | |||
// Enable the audio shield, select the input and set the output volume. | |||
audioShield.enable(); | |||
audioShield.inputSelect(myInput); | |||
audioShield.volume(0.75); | |||
audioShield.unmuteLineout(); | |||
// audioShield.audioProcessorEnable(); // enable the DAP block in SGTL5000 | |||
audioShield.volume(0.5); | |||
audioShield.audioPostProcessorEnable(); // enable the DAP block in SGTL5000 | |||
// audioShield.eqSelect(1); // using PEQ Biquad filters | |||
// audioShield.eqFilterCount(2); // enable filter 0 & filter 1 | |||
calcBiquad(FILTER_PARAEQ,110,0,0.2,524288,44100,updateFilter); // automation negates the need |
@@ -5,6 +5,7 @@ This example code is in the public domain | |||
#include <Audio.h> | |||
#include <Wire.h> | |||
#include <SPI.h> | |||
#include <SD.h> | |||
@@ -34,8 +35,7 @@ void setup() { | |||
// Enable the audio shield and set the output volume. | |||
audioShield.enable(); | |||
audioShield.inputSelect(myInput); | |||
audioShield.volume(0.75); | |||
audioShield.unmuteLineout(); | |||
audioShield.volume(0.5); | |||
} | |||
elapsedMillis chgMsec=0; |
@@ -5,6 +5,7 @@ This example code is in the public domain | |||
#include <Audio.h> | |||
#include <Wire.h> | |||
#include <SPI.h> | |||
#include <SD.h> | |||
const int myInput = AUDIO_INPUT_LINEIN; | |||
@@ -34,8 +35,7 @@ void setup() { | |||
// Enable the audio shield and set the output volume. | |||
audioShield.enable(); | |||
audioShield.inputSelect(myInput); | |||
audioShield.volume(0.75); | |||
audioShield.unmuteLineout(); | |||
audioShield.volume(0.5); | |||
} | |||
elapsedMillis chgMsec=0; |
@@ -5,6 +5,7 @@ This example code is in the public domain | |||
#include <Audio.h> | |||
#include <Wire.h> | |||
#include <SPI.h> | |||
#include <SD.h> | |||
@@ -34,8 +35,8 @@ void setup() { | |||
// Enable the audio shield and set the output volume. | |||
audioShield.enable(); | |||
audioShield.inputSelect(myInput); | |||
audioShield.volume(0.75); | |||
audioShield.unmuteLineout(); | |||
audioShield.volume(0.5); | |||
audioShield.audioPreProcessorEnable(); | |||
// here are some settings for AVC that have a fairly obvious effect | |||
audioShield.autoVolumeControl(2,1,0,-5,0.5,0.5); // see comments starting line #699 of control_sgtl5000.cpp in ./libraries/audio/ | |||
// AVC has its own enable/disable bit | |||
@@ -48,7 +49,7 @@ float lastVol=1024; | |||
void loop() { | |||
// every 10 ms, check for adjustment | |||
if (chgMsec > 10) { | |||
float vol1=analogRead(15)/10.23; | |||
float vol1=analogRead(15)/1023.0; | |||
vol1=(int)vol1; | |||
if(lastVol!=vol1) | |||
{ |
@@ -5,6 +5,7 @@ This example code is in the public domain | |||
#include <Audio.h> | |||
#include <Wire.h> | |||
#include <SPI.h> | |||
#include <SD.h> | |||
@@ -34,9 +35,9 @@ void setup() { | |||
// Enable the audio shield and set the output volume. | |||
audioShield.enable(); | |||
audioShield.inputSelect(myInput); | |||
audioShield.volume(0.75); | |||
audioShield.unmuteLineout(); | |||
audioShield.volume(0.5); | |||
// just enable it to use default settings. | |||
audioShield.audioPostProcessorEnable(); | |||
audioShield.enhanceBassEnable(); // all we need to do for default bass enhancement settings. | |||
// audioShield.enhanceBass((float)lr_level,(float)bass_level); | |||
// audioShield.enhanceBass((float)lr_level,(float)bass_level,(uint8_t)hpf_bypass,(uint8_t)cutoff); | |||
@@ -49,7 +50,7 @@ float lastVol=1024; | |||
void loop() { | |||
// every 10 ms, check for adjustment | |||
if (chgMsec > 10) { // more regular updates for actual changes seems better. | |||
float vol1=analogRead(15)/10.23; | |||
float vol1=analogRead(15)/1023.0; | |||
vol1=(int)vol1; | |||
if(lastVol!=vol1) | |||
{ |
@@ -55,9 +55,6 @@ void setup(void) | |||
audioShield.enable(); | |||
audioShield.volume(0.5); | |||
// I want output on the line out too | |||
audioShield.unmuteLineout(); | |||
// audioShield.muteHeadphone(); | |||
Serial.println("setup done"); | |||
@@ -143,9 +143,6 @@ void setup() | |||
codec.enable(); | |||
codec.volume(0.45); | |||
// I want output on the line out too | |||
// Comment this if you don't it | |||
codec.unmuteLineout(); | |||
// reduce the gain on some channels, so half of the channels | |||
// are "positioned" to the left, half to the right, but all |