frequency spectrum analyzer

Hi,

I want to sample an audio file and show it on a graph.
so, I need to sample the frequencies between 20Hz and 15Khz.

How do I do that with DirectX
I just need to know how to sample a file, the methods/functions. (without hearing it,just open in on the memory and read it's content to chart like waveform)

thx very much.


Answer this question

frequency spectrum analyzer

  • Filipe Fortes - MSFT

    I'm no audio guy, but I think what you need to do is perform a Fourier Transform on the sound data. That will give you information about the basic sine waves that the sound is made up of; you can group those sines by frequency and use them to create your graph.

    To the best of my knowledge, DirectX (it would be DirectSound, specifically) does not contain any Fourier Transformation technologies. You may want to try googling for a library called 'FFTW.'


  • frequency spectrum analyzer