Posted in Mini Projects, Projects (This page is no longer updated. See NEWS page for the latest updates)

Davide Reato

This program create a sound using an image as the spectrogram of the sound created.
The input of the program is an image, the output is a sound. If you look at the spectrogram of the sound created (using, for example, Baudline in Linux) you’ll see the image you used.

The purpose of this program is pure fun and I took inspiration from Alcaze, by Tito Dal Canton.

The program is written in MATLAB but I am currently writing it in Python too.

The program can work in 2 ways:

  1. It reads the image – It scales it (just to make everything faster) – It considers the image as the imaginary part (more “information” than the real part) of the fft of the sound we want to create – It applies the ifft mapping every pixel of the image in a vector of a chosen size – It pasts together all the vectors – It converts the created vector to a sound
  2. It reads the image – It scales it (just to make everything faster) – It creates for each line a vector sum of sinusoids with amplitude the value of the pixel and phase chosen as white uniform noise – It pasts together all the vectors – Since pasting together the signals gives spiking sounds (because of the non-perfect matching of the vectors) the final vector is filtered in the frequency band considered – It converts the created vector to a sound

The following is an example of the result of the program.
If you listen at the sound and if you look at its spectrogram, you’ll get this result.


the matlab code of this program is coming really soon