You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/bells_envelope_test/sketch.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
2
-
// This example shows a more complex use of the .rampAD function for the envelope.
2
+
// This example shows a more complex use of the .ramp function for the envelope.
3
3
// You can use it to make a simple attack/decay envelope for struck or plucked style notes.
4
4
// Here, we're creating synthetic bells using additive synthesis, and triggering each of their attacks and decays differently to make different harmonics last for different times.
5
5
// Have fun! - Jeff Snyder
@@ -124,7 +124,7 @@ function makeSoundAttack(time, playbackRate)
124
124
varwhichNote=patternArray[note];
125
125
for(vari=0;i<numOsc;i++)
126
126
{
127
-
envelope[whichNote][i].rampAD(osc[whichNote][i],time,(oscVols[whichNote][i]*random(.8,1.0)));// the added randomness just makes each strike a little different.
127
+
envelope[whichNote][i].ramp(osc[whichNote][i],time,(oscVols[whichNote][i]*random(.8,1.0)),0);// the added randomness just makes each strike a little different.
0 commit comments