Here is the link to the source code for my sound-visualizer/audio-visual-narrative homework project. Unpack it, run the make file, then run the program, while making sure the provided "Misirlou.wav" file is in the current working directory from where you run the "Story" executable. The program expects to both find an input channel to visualize the sound coming in, and an output channel to output some sounds that the input channel can pick-up (i.e. - have a mic and speakers, not headphones).
The surfboard rides the FFT waves of the captured sounds. Wistle! Sing! See what happens. If it gets stuck in a corner press R or L to get a sweep going to help you out. The sun spirals with the sounds you make. Get weird!
When you've had enough you can always press Q to quit, but try H if you're in a cheerful mood, or S if you're feeling a bit more introspective. This disables the other buttons (other than Q) and lets a short, simple, 2.5 min narrative unfold. Enjoy it.
Print statements everywhere! Debugging the simulated physics of the surfboard, and the drawing of all the layers of graphics, was tricky. In the end, it's laways print statements that help.
Smoothing was not always easy, but effective everywhere it was used!