setRange(aLevel, rLevel) {
    this.aLevel = aLevel || 1;
    this.rLevel = rLevel || 0;

    // not sure if this belongs here:

    // {Number} [dLevel] decay/sustain level (optional)
    // if (typeof(dLevel) !== 'undefined') {
    //   this.dLevel = dLevel
    // } else if (this.sPercent) {
    //   this.dLevel = this.sPercent ? this.sPercent * (this.aLevel - this.rLevel) + this.rLevel : 0;
    // }
  }
Set max (attackLevel) and min (releaseLevel) of envelope.

 @method  setRange
 @for p5.Envelope
 @param {Number} aLevel attack level (defaults to 1)
 @param {Number} rLevel release level (defaults to 0)
 @example
 <div><code>
 let attackLevel = 1.0;
 let releaseLevel = 0;

 let attackTime = 0.001;
 let decayTime = 0.2;
 let susPercent = 0.2;
 let releaseTime = 0.5;

 let env, triOsc;

 function setup() {
   let cnv = createCanvas(100, 100);
   cnv.mousePressed(playEnv);

   env = new p5.Envelope();
   triOsc = new p5.Oscillator('triangle');
   triOsc.amp(env);
   triOsc.freq(220);
 }

 function draw() {
   background(220);
   text('tap here to play', 5, 20);
   attackLevel = map(mouseY, height, 0, 0, 1.0);
   text('attack level: ' + attackLevel, 5, height - 20);
 }

 function playEnv() {
   triOsc.start();
   env.setRange(attackLevel, releaseLevel);
   env.play();
 }
 </code></div>