How to write visualization software?

cchen

Diamond Member
Oct 12, 1999
6,062
0
76
I am part of a software design team to write a dance game with music, similar to Dance Dance Revolution by Konami. I ran across Basically what I want do have in my project is visualizations that correspond to music, such as some of the Winamp plugins.
How do you make the music correspond to the visualization? I plan on using MP3 or wav files and I can't figure out how
you could analyze the sound file without some sort of Fourier analysis.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Why not adapt some of the opensource code that does that sort of thing? I'm fairly sure that there are some linux programs that do what you describe. Haven't used them though, so can't make any reccomendations.
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Different visualisations need different data.

The time domain data will give you oscilloscope type displays - e.g. simple oscilloscope, flowers, fountains, etc.

The frequency domain data is used for spectrum analysers, and frequency dependent actions - e.g. disco light type effects

The MP3 bitstream after decompression leaves you with frequency domain data, which then needs fourier synthesis to obtain time domain data suitable for output to a wave device. This means that if your music is stored as MP3, you immediately have available both the time and frequency spectra, with no additional processing.