Occasionally I like to listen to music and have a visualizer flicker along with the music.
I tried the ncmpcpp build-in visualizer and c.a.v.a. but for some reason they both had a pretty terrible framerate. I wanted something that is as smooth as the foobar2k spectrum visualizer, so I decided to write my own music visualizer.
The project started off as a simple Oscilloscope with no filtering, just a modified OpenGL learning example that draws the audio buffer.
Once I became a little more familiar with OpenGL and a FFT library (most of the code was taken from ncmpcpp :) ) I modified the project to render a audio spectrum. Back then the code was pretty ugly C with global functions and variables. Porting the code over to C++ was pretty much straight forward with the occasional segfaults due to switching variable names.
After some time, I figured that hard-coded variables aren't good enough, so I implemented configuration file parsing.
Since then I implemented other features like pulseaudio input, spectrum gravity (done on the GPU), rainbow colors and runtime configuration parsing and rendering.
Here are some example pictures:
Github link, In case you are interested: