2

I'm looking for a C or C++ API that will give me real-time spectrum analysis of a waveform on Windows.

I'm not entirely sure how large a sample window it should need to determine frequency content, but the smaller the better. For example, if it can work with a 0.5 second long sample and determine frequency content to the Hz, that would be wicked-awesome.

Paul R
  • 208,748
  • 37
  • 389
  • 560
bobobobo
  • 64,917
  • 62
  • 258
  • 363
  • Possible duplicate: [How to extract semi-precise frequencies from a WAV file using Fourier Transforms](http://stackoverflow.com/questions/2881583/how-to-extract-semi-precise-frequencies-from-a-wav-file-using-fourier-transforms) – Paul R May 22 '10 at 08:35

2 Answers2

2

I used FFTW a few years ago. It is supposedly fast (though I didn't use it for anything real-time myself) and was certainly pretty easy to use, even on Windows.

Regarding the window size, see the Nyquist-Shannon sampling theorem.

(I imagine there are other issues involved when using a window on the data, particularly for low frequencies, but I'm no expert and I couldn't find any useful-looking info about this, so maybe I'm wrong.)

1

For details of how to generate a power spectrum and how to determine frequency resolution of same, please see my answer to this question: How to extract semi-precise frequencies from a WAV file using Fourier Transforms

Community
  • 1
  • 1
Paul R
  • 208,748
  • 37
  • 389
  • 560