public double[] processWindow(double[] window, int start) throws IllegalArgumentException
  {
    //number of unique coefficients, and the rest are symmetrically redundant
    int fftSize = (windowSize / 2) + 1;

    //check start
    if(start < 0)
      throw new IllegalArgumentException("start must be a positve value");

    //check window size
    if(window == null || window.length - start < windowSize)
      throw new IllegalArgumentException("the given data array must not be a null value and must contain data for one window");

    //just copy to buffer
    for (int j = 0; j < windowSize; j++)
      buffer[j] = window[j + start];

    //perform power fft
    normalizedPowerFFT.transform(buffer, null);

    //use all coefficient up to the nequist frequency (ceil((fftSize+1)/2))
    Matrix x = new Matrix(buffer, windowSize);
    x = x.getMatrix(0, fftSize-1, 0, 0); //fftSize-1 is the index of the nyquist frequency

    //apply mel filter banks
    x = melFilterBanks.times(x);

    //to db
    double log10 = 10 * (1 / Math.log(10)); // log for base 10 and scale by factor 10
    x.thrunkAtLowerBoundary(1);
    x.logEquals();
    x.timesEquals(log10);

    //compute DCT
    x = dctMatrix.times(x);

    return x.getColumnPackedCopy();
  }