Package edu.purdue.wind

Examples of edu.purdue.wind.FFT


  int data[] = wave.sampleData(channel);
  for (int i = 0; i < nSamples; i++) {
      samples[i] = (double)data[i];
  }

  FFT fft = new FFT(nSamples, window);
  fft.transform(samples);

  // Output the spectrum
  double[] magnitude = fft.magnitudes();
  final double stepHz = 2.0d * nSamples / (double)wave.sampleRate();

  for (int i = 0; i < nSamples / 2; i++) {
      System.out.println("" + (stepHz * i) + " " + magnitude[i]);
  }
View Full Code Here

TOP

Related Classes of edu.purdue.wind.FFT

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.