noteRelease(_note, secondsFromNow) {
    var now = p5sound.audiocontext.currentTime;
    var tFromNow = secondsFromNow || 0;
    var t = now + tFromNow;

    // if a note value is not provided, release all voices
    if (!_note) {
      this.audiovoices.forEach(function (voice) {
        voice.triggerRelease(tFromNow);
      });
      this._voicesInUse.setValueAtTime(0, t);
      for (var n in this.notes) {
        this.notes[n].dispose();
        delete this.notes[n];
      }
      this._newest = 0;
      this._oldest = 0;
      return;
    }

    //Make sure note is in frequency inorder to query the this.notes object
    var note = noteToFreq(_note);

    if (!this.notes[note] || this.notes[note].getValueAtTime(t) === null) {
      console.warn('Cannot release a note that is not already playing');
    } else {
      //Find the scheduled change in this._voicesInUse that will be previous to this new note
      //subtract 1 and schedule this value at time 't', when this note will stop playing
      var previousVal = Math.max(~~this._voicesInUse.getValueAtTime(t), 1);
      this._voicesInUse.setValueAtTime(previousVal - 1, t);
      //Then update all scheduled values that follow to decrease by 1 but never go below 0
      if (previousVal > 0) {
        this._updateAfter(t, -1);
      }

      this.audiovoices[this.notes[note].getValueAtTime(t)].triggerRelease(
        tFromNow
      );
      this.notes[note].dispose();
      delete this.notes[note];

      this._newest =
        this._newest === 0 ? 0 : (this._newest - 1) % (this.maxVoices - 1);
    }
  }
Trigger the Release of an AudioVoice note. This is similar to releasing
 the key on a piano and letting the sound fade according to the
 release level and release time.

 @method  noteRelease
 @for p5.PolySynth
 @param  {Number} [note]           midi note on which attack should be triggered.
                                   If no value is provided, all notes will be released.
 @param  {Number} [secondsFromNow] time to trigger the release
 @example
 <div><code>
 let polySynth = new p5.PolySynth();
 let pitches = ['G', 'D', 'G', 'C'];
 let octaves = [2, 3, 4];

 function setup() {
   let cnv = createCanvas(100, 100);
   cnv.mousePressed(playChord);
   background(220);
   text('tap to play', 20, 20);
 }

 function playChord() {
   userStartAudio();

   // play a chord: multiple notes at the same time
   for (let i = 0; i < 4; i++) {
     let note = random(pitches) + random(octaves);
     polySynth.noteAttack(note, 0.1);
   }
 }

 function mouseReleased() {
   // release all voices
   polySynth.noteRelease();
 }
 </code></div>