Find The Hidden Face in Aphex Twin’s Famous Song with Python

Emre BALAK
Analytics Vidhya
Published in
3 min readJun 17, 2020

It might sound weird at first but one of Aphex Twin’s famous song’s name ision editor has reviewed your ΔMi−1 = −∂Σn=1NDi[n][Σj∈C{i}Fji[n − 1] + Fexti[[n−1]]. The name is obviously an equation, however, it is a mystery that whether this equation makes sense or not.

There is something which is more interesting than the song’s name. The artist hid a face in the song which can be seen by creating a spectrogram and analyzing it in log scale. But what is spectrogram?

Spectrogram can be called as visual representation of frequencies of a given signal with time. In a spectrogram representation plot, one axis represents the time, the second axis represents frequencies and the colors represent magnitude (amplitude) of the observed frequency at a particular time. An example spectrogram representation example is below. and bright colors represent strong frequencies.

We will now create a spectrogram and show the hidden face in the song. To do this, we will do following steps :

  • Read left stereo of .wav file (last 36 seconds of song where the hidden face is) by the help of read function of scipy.io.wavfile library and take left stereo.
  • Normalize the signal according to its max value.
  • Define two parameters:
    – Window Size: Size of the rectangular window.
    – Step: It is unnecessary to calculate the FFTs for every data point. Thus, starting from 0 th data point, you should decide on next data points according to step value.
  • Extract windows and make hanning window multiplied it with amplitudes before passing it to FFT to handle discontinuity of small signal.
  • Work on the first half of FFT and calculate absolute values.
  • Use 10 * log10(x + c) to smooth the data for a better representation.
  • The final 2D spectrogram matrix whichh rows and columns represent window frame number and frequency bin, values represent the strength of the frequencies is created.
  • Use pcolormesh function of matplotlib is to obtain a visual from the data.
  • The artist hid the face into log scale. So, ’y scale’ is selected as
    ’symlog.

That’s it, now we can show the hidden face artist hid.

Here is the Python implementation:

If you liked the article, wouldn’t you like to clap and share it with others? Giving me feedback by commenting makes me very happy.

You can also contact with me on one of the channels below to criticize, contribute, ask questions or ask for help.

GitHub | LinkedIn

--

--

Emre BALAK
Analytics Vidhya

4th Grade Computer Engineering Student @Istanbul Tecnical University