Hello I wrote the following Faust code
and I am now trying to get it to run on my teensy I wrote the following code however I hear no sound. Any help would be appreciated
Code:
import("stdfaust.lib");
// vertical voice group
osc_g(i,x) = vgroup("OSC %2nn", x)
with{
nn = i+1;
};
// Oscillator
f = hslider("[06]Freq",440,1,20000,0.1);
s = nentry("[07]Waveform Select",0,0,2,1);
oscillator = os.polyblep_saw(f),
os.polyblep_square(f),
os.polyblep_triangle(f) :
select3(s);
//Amp
attack = hslider("[01]Attack",0,0,400,0.1);
decay = hslider("[02]Decay",0,0,400,0.1);
sustain = hslider("[03]Sustain",0,0,1,0.1);
release = hslider("[04]Release",0,0,20,0.1);
volume = hslider("[05]Volume",0,0,1,0.01);
gate = button("[08]Gate");
envelope = en.adsr(attack,decay,sustain,release,gate);
amp = envelope*volume;
process = hgroup("MYSYNTH", par(i,3,osc_g(i,oscillator*amp))):>_;
and I am now trying to get it to run on my teensy I wrote the following code however I hear no sound. Any help would be appreciated
Code:
#include <Audio.h>
#include "Synth1.h"
AudioOutputI2S out;
AudioControlSGTL5000 audioShield;
Synth1 Synth;
AudioConnection patchCord0(Synth,0,out,0);
AudioConnection patchCord1(Synth,0,out,1);
void setup() {
AudioMemory(2);
audioShield.enable();
audioShield.volume(1);
Synth.setParamValue("gate",1);
}
void loop() {
Synth.setParamValue("f",random(50,1000));
delay(50);
}