Envelopes

Downloads

Download the files used in the above examples by right-clicking the links, and then selecting "Save Link As...".

Vocabulary

Self-Quiz

  1. I have an ADSR curve with an attack value of 1, a delay value of 2, a sustain value of 0.5, and a release value of 0.5. If I apply it to an oscillator, how long is the resulting sound?
  2. Let's say I have the following float array:

    const curve = new Float32Array([0, 1, 0, 0, 1, 0]);

    If I call...

    gain.gain.setValueCurveAtTime(curve, audioCtx.currentTime, 10);
    

    ...how many seconds will I be hearing sound?