diff options
| author | mick grierson <mickgrierson@gmail.com> | 2015-08-27 13:33:41 +0100 |
|---|---|---|
| committer | mick grierson <mickgrierson@gmail.com> | 2015-08-27 13:33:41 +0100 |
| commit | 5b37d13616c303538a61b520e6930b322e4ff378 (patch) | |
| tree | a616325e9bdd71ba22fd22ad419963035322e8a0 /maximilian_examples/15.polysynth.cpp | |
| parent | b155008277cbdba3534ca392d67e2db199d9c458 (diff) | |
redoing tutorials a bit
Diffstat (limited to 'maximilian_examples/15.polysynth.cpp')
| -rw-r--r-- | maximilian_examples/15.polysynth.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/maximilian_examples/15.polysynth.cpp b/maximilian_examples/15.polysynth.cpp index 3e278cb..fefc261 100644 --- a/maximilian_examples/15.polysynth.cpp +++ b/maximilian_examples/15.polysynth.cpp @@ -47,8 +47,6 @@ void play(double *output) { pitch[voice]=voice+1; voice++; - lastCount=0; - } //and this is where we build the synth @@ -56,7 +54,7 @@ void play(double *output) { for (int i=0; i<6; i++) { - ADSRout[i]=ADSR[i].adsr(1.,ADSR[i].trigger);//our ADSR env has 8 value/time pairs. + ADSRout[i]=ADSR[i].adsr(1.,ADSR[i].trigger);//our ADSR env is passed a constant signal of 1 to generate the transient. LFO1out[i]=LFO1[i].sinebuf(0.2);//this lfo is a sinewave at 0.2 hz @@ -74,6 +72,8 @@ void play(double *output) { output[0]=mix*0.5;//left channel output[1]=mix*0.5;//right channel + + // This just sends note-off messages. for (int i=0; i<6; i++) { ADSR[i].trigger=0; } |
