update(fftObject) {
    var nrg = (this.energy = fftObject.getEnergy(this.f1, this.f2) / 255);
    if (nrg > this.cutoff && nrg > this.threshold && nrg - this.penergy > 0) {
      // trigger callback
      this._onPeak();
      this.isDetected = true;

      // debounce
      this.cutoff = nrg * this.cutoffMult;
      this.framesSinceLastPeak = 0;
    } else {
      this.isDetected = false;
      if (this.framesSinceLastPeak <= this.framesPerPeak) {
        this.framesSinceLastPeak++;
      } else {
        this.cutoff *= this.decayRate;
        this.cutoff = Math.max(this.cutoff, this.threshold);
      }
    }

    this.currentValue = nrg;
    this.penergy = nrg;
  }
The update method is run in the draw loop.

 Accepts an FFT object. You must call .analyze()
 on the FFT object prior to updating the peakDetect
 because it relies on a completed FFT analysis.

 @method  update
 @param  {p5.FFT} fftObject A p5.FFT object