diff --git a/step-sequencer/index.html b/step-sequencer/index.html index 678b7a8..4e1d5a6 100644 --- a/step-sequencer/index.html +++ b/step-sequencer/index.html @@ -222,7 +222,6 @@

DTMF

); // Expose attack time & release time - const sweepLength = 2; function playSweep(time) { const osc = new OscillatorNode(audioCtx, { frequency: 380, @@ -236,12 +235,12 @@

DTMF

sweepEnv.gain.linearRampToValueAtTime(1, time + attackTime); sweepEnv.gain.linearRampToValueAtTime( 0, - time + sweepLength - releaseTime + time + attackTime + releaseTime ); osc.connect(sweepEnv).connect(audioCtx.destination); osc.start(time); - osc.stop(time + sweepLength); + osc.stop(time + attackTime + releaseTime); } // Expose frequency & frequency modulation