bobobobo
bobobobo

Reputation: 67266

Real-time spectrum analyzer with API

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.

Upvotes: 2

Views: 9905

Answers (2)

Paul R
Paul R

Reputation: 213059

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

Upvotes: 1

please delete me
please delete me

Reputation:

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.)

Upvotes: 2

Related Questions