my faust code. the faust code generates a "teensy" library "Volume.h" and "Volume.cpp" from https://faustide.grame.fr/
import("stdfaust.lib");
gain = vslider("[1]", 0, -70, +4, 0.1) : ba.db2linear : si.smoo;
process = *(gain);
then my teensy code here (volume.ino) will pass through audio unless I comment out volume.setParamValue("gain",0.5);
!
I have no idea why
#include <Audio.h>
#include "Volume.h"
Volume volume;
AudioInputI2S in;
AudioOutputI2S out;
AudioControlSGTL5000 audioShield;
AudioConnection patchCord0(in,0,out,0);
AudioConnection patchCord1(in,1,out,1);
void setup() {
AudioMemory(20);
audioShield.enable();
audioShield.inputSelect(AUDIO_INPUT_LINEIN);
audioShield.volume(0.5);
// audio will go through unless this line is uncommented!
// ?????
// volume.setParamValue("gain",0.5);
}
void loop() {
delay(100);
}