linAverages(_N) {
    var N = _N || 16; // This prevents undefined, null or 0 values of N

    var spectrum = this.freqDomain;
    var spectrumLength = spectrum.length;
    var spectrumStep = Math.floor(spectrumLength / N);

    var linearAverages = new Array(N);
    // Keep a second index for the current average group and place the values accordingly
    // with only one loop in the spectrum data
    var groupIndex = 0;

    for (var specIndex = 0; specIndex < spectrumLength; specIndex++) {
      linearAverages[groupIndex] =
        linearAverages[groupIndex] !== undefined
          ? (linearAverages[groupIndex] + spectrum[specIndex]) / 2
          : spectrum[specIndex];

      // Increase the group index when the last element of the group is processed
      if (specIndex % spectrumStep === spectrumStep - 1) {
        groupIndex++;
      }
    }

    return linearAverages;
  }
Returns an array of average amplitude values for a given number
 of frequency bands split equally. N defaults to 16.
 <em>NOTE: analyze() must be called prior to linAverages(). Analyze()
 tells the FFT to analyze frequency data, and linAverages() uses
 the results to group them into a smaller set of averages.</em></p>

 @method  linAverages
 @for p5.FFT
 @param  {Number}  N                Number of returned frequency groups
 @return {Array}   linearAverages   Array of average amplitude values for each group