DSP Experiments

I spent the final days of the summer exploring the Fourier transform with Nicolas Avrutin by writing an image <-> audio converter in Python/Numpy. This was more an exercise in learning Numpy, but the result is pretty cool:

This is the spectrograph of an 18 second audio file generated by our script. The ghostly vertical lines are due to interpolation issues, translating an image sampled at a certain rate into an image with far fewer pixels columns than necessary. Color represents intensity of the sound.

We implemented a full color version by using a three channel WAV file (usually used for surround sound or secondary language purposes). We had to write a custom spectrograph generator, as SOX will not combine the channels into a color image. Here’s SOX’s spectrograph:

And our own spectrograph:

Work has been halted on this project while Nick and I deal with school, but this could be used to embed a faint image into music.

Comments are closed.