function OnsetDetect(freqLow, freqHigh, threshold, callback) {
    onsetDetect_classCallCheck(this, OnsetDetect);
    this.isDetected = false;
    this.freqLow = freqLow;
    this.freqHigh = freqHigh;
    this.treshold = threshold;
    this.energy = 0;
    this.penergy = 0;

    this.sensitivity = 500;
    this.callback = callback;
  }
Listen for onsets (a sharp increase in volume) within a given
 frequency range.

 @class p5.OnsetDetect
 @constructor
 @param {Number} freqLow     Low frequency
 @param {Number} freqHigh     High frequency
 @param {Number} threshold   Amplitude threshold between 0 (no energy) and 1 (maximum)
 @param {Function} callback  Function to call when an onset is detected