XNA Creators Club Online
Page 1 of 1 (2 items)
Sort Posts: Previous Next

Pre-processing and non-realtime processing of audio files.

Last post 5/27/2009 6:18 PM by Shawn Hargreaves. 1 replies.
  • 5/27/2009 12:29 AM

    Pre-processing and non-realtime processing of audio files.

    I am looking to do pre-processing of visualization data on songs that are not currently playing.
    It seems with MediaPlayer, you can only access the current sample of visualization data for the currently playing song.

    Are there other libraries that allow for generating a data structure of visualization data vs time of a song that has not been played?
    Or is there a description of the math that XNA uses to calculate the data from the song being played?

    Thanks.
  • 5/27/2009 6:18 PM In reply to

    Re: Pre-processing and non-realtime processing of audio files.

    The XNA Framework MediaPlayer only provides visualization data while a song is playing. This is not designed for offline preprocessing.

    I don't know personally of any other libraries that do this, but I'm sure many exist. You will need first a decoder to convert the song data into a PCM waveform (google for "mp3 decoder" will find many options), and then to run a fast fourier transform (FFT) over the PCM data to convert it into frequency bands (again google for "C# FFT" will find some options).
    XNA Framework Developer - blog - homepage
Page 1 of 1 (2 items) Previous Next