Lately, I have been trying to mix two of my passions: maths and music. More precisely, I wanted to reuse the concepts I had seen in signal processing to produce fun visuals to go with some music I made.
I eventually ended up creating a little series of videos that ‘show’ the sound in different forms: sound waves, frequency spectrums, volume bubbles…
All of these are on my Youtube channel, go and have look!
To do so, I read the sound files as signal data and then processed it with various methods, depending on the desired output. For example, for the Achernar title displayed above, I used the famous Fourier transform to get some spectrums and display the music’s frequencies. Other musics have quite a different render, you can see some below.
I did all this in Python (with the
NumPy libraries) and it was really nice to be able to easily turn these sounds into colors and movement! I adapted a code from Yu-Jie Lin and the complete project is available here (in a compressed .zip archive): just follow the
usage() and find a WAV sound to use!
If you want a preview, here is the code that generated the video at the beginning of this article:
- Yu Jie Lin’s code: https://gist.github.com/manugarri/1c0fcfe9619b775bb82de0790ccb88da