So, I've been working on a little visualizer for sound files, just for fun. I basically wanted to imitate the "Scope" and "Ocean Mist" visualizers in Windows Media Player. Scope was easy enough, but I'm having problems with Ocean Mist. I'm pretty sure that it is some kind of frequency spectrum, but when I do an FFT on my waveform data, I'm not getting the data that corresponds to what Ocean Mist displays. The spectrum actually looks correct, so I knew there was nothing wrong with the FFT. I'm assuming that the visualizer runs the spectrum through some kind of filter, but I have no idea what it might be. Any ideas?
EDIT2: I posted an edited version of my code here. By edited, I mean that I removed all the experimental comments everywhere, and left only the active code. I also added some descriptive comments. The visualizer now looks like this.
EDIT: Here are images. The first is my visualizer, and the second is Ocean Mist.
my visualizer http://i43.tinypic.com/5xuyqa.jpg ocean mist http://i41.tinypic.com/f1bb04.jpg
Normally for this kind of thing you want to convert your FFT output to a power spectrum, usually with a log (dB) amplitude scale, e.g. for a given output bin:
p = 10.0 * log10 (re * re + im * im);
Here's some Octave code that shows what I think should happen. I hope the syntax is self-explanatory:
which results in the following graph: top: regular spectral plot, bottom: loglog spectral plot (blue is unwindowed) http://img710.imageshack.us/img710/3994/spectralplots.png
I'm letting Octave handle the scaling from linear to log x and y axes. Do you get something similar for a simple waveform like a sine wave?
OLD ANSWER
I'm not familiar with the visualizer you mention, but in general:
It seems to that not only the y axis, but the x axis also is logarithmic. The distance between peaks seems to lower at higher frequencies.
It definitely looks like the ocean mist Y-Axis is logarithmic.