Skip to main content

Posts

Showing posts from June, 2016

Howto: Design and Code a Music Visualizer

Just here for code? Look no further. What is a Music Visualizer?
A generation of visuals based on the music. demo
How to Implement a Music Visualizer? 
Processing the audio file and run a Fourier transformation on audio data to get information about the original sound wave (amplitude and frequency)Store this data Output a visual based on the stored data when music is playedThings to Think About Before Coding
How to play the sound? How to implement Fourier transformation?How to interpret information from the Fourier transformation?How to sync visual with music?What does the data in an audio file represent? 
How I Implemented my Music Visualization Software
I wrote my visualization software in c and used the SDL2 sound API to play an audio WAV file.  To compute the Fourier Transformation I used FFTW, a C routine library known for efficiently computing Discrete Fourier (DFT) Transformations.  My visuals (power spectrum from selected frequencies) is outputted to the Linux Terminal.



Using DFT Re…