For my final project, I chose to create a music visualizer. In order to get the audio data, I had to find a reliable, cross-platform audio library so I could get my project to run in all environnments. I ended up using PortAudio. Once I picked a library, I had to figure out how to open an audio stream, and perform an FFT on the data so I could get data that was usable for my graphics program.
I used polar equations to generate the shapes in the middle, with 6,000 particles in each of them which are processed in the vertex shader to run the equations. The vertical lines are cosine functions of the:
Bass (20Hz to 140Hz)
Mid Bass (140Hz to 400Hz)
Mid (400Hz - 2600Hz)
Upper Mids (2600Hz - 6000Hz)
Highs (6000Hz to 14000Hz)
For the dance floor, I generated rows of cubes with four separate vertex and fragment shaders. Each of these shaders changes color according to different audio values.