-2

I want to create a music player with Python which uses OpenGL for visualizing the audio spectrum. enter image description here

I already have the 3d engine set up and all I need is to get the spectrum data and feed it to the renderer. I'd imagine it would be a list of numbers updated each few miliseconds or so.

I've heard you can get that info with FMOD and there's pyfmodex Python wrapper for it, but I can't access the FMOD documentation and the pyfmodex is almost undocumented. Can't find what I need by just browsing the class/function names. If there's another library which can get that info that will also work.

  • As the post clearly says, if there's anything else besides FMOD which can do the job, then that will work for me. Also, I just want to know how to get the spectrum information, whether I use it in a 3d program is irrelevant for answering the question. - for the person who edited the title –  Mar 01 '13 at 17:32

1 Answers1

4

numpy has an FFT function that will compute a fast fourier transform on a block of input data. You can use its output to obtain your spectral information.

sizzzzlerz
  • 4,277
  • 3
  • 27
  • 35
  • Where can one learn about fourier transforms and what they have to do with this? –  Mar 01 '13 at 18:00
  • 2
    The FFT is a very well known tool in signal processing. Doing a Google search should reveal thousands of pages that discuss it or find and read a signal processing text from your library. For a complete understanding of the theory behind the FFT and its cousin, the discrete fourier transfor, or DFT, you do need to have a bit of mathematical background. To use it, however, just requires that you follow a simple formula. – sizzzzlerz Mar 01 '13 at 18:15