function setup(){
  createCanvas(600, 300);
  background(20);
  fill(0,255,0);

  trigger = millis();

  osc = new p5.SinOsc();
  osc.freq(220);
  osc.start();

  env = new p5.Envelope();
  env.setADSR(attackTime, decayTime, susPercent, releaseTime);
  env.setRange(attackLevel, releaseLevel);

  osc.amp(env);
  createP('click mouse to triggerAttack, release mouse to triggerRelease');

  a = new p5.Amplitude();
}
Example: Create an Envelope (p5.Envelope) to control oscillator amplitude.
 Trigger the Attack portion of the envelope when the mouse is clicked.
 Trigger the Release when the mouse is released.