code: function ( freq, endFreq ) {
        var sum = 0;
        if ( endFreq !== undefined ) {
          for ( var i = freq; i <= endFreq; i++ ) {
            sum += this.getSpectrum()[ i ];
          }
          return sum / ( endFreq - freq + 1 );
        } else {
          return this.getSpectrum()[ freq ];
        }
      }
docs: Returns the magnitude of a frequency or average over a range of frequencies