This research project was carried out for the purpose of a university course related to non-euclidian geometry and fractals. The goal of the course was for the attendees to “study” a fractal of their choice (such as the Sierpiński triangle, the Koch snowflake etc). I decided to go with something original and instead studied a kind of music generated procedurally by a computer program written in C. The impressive thing about this music is that the code generating it is really short (only 246 characters, including playback code). Therefore, I wanted to see if this was possibly due to the use of a chaotic system leading a factal behaviour.

Fractal spectrogram
Spectrogram of the song at different intensity threshold values

To study that, I had to compute something called the Hausdorff dimension, also known as the fractal dimension. Indeed, this number help concludes if the pattern observed is indeed fractal or not. There exists two ways to compute the Hausdorff dimension of a given pattern. The first, most simple and widely known is called the box counting method which gives the Minkowski–Bouligand dimension. This dimension has upper and lower bound closely related to the Hausdorff dimension and hence is a good candidate.

fractal dimension of the coasts of Britain using the box counting method
Estimating the fractal dimension of the coasts of Britain using the box counting method

The second method is much more adapted to sounds, and is called the variation method. It’s been described by Dubuc et al in 1996 and reformalised by Bigerelle et al in 2000. It essetially compares the area under the soundwaves at different timescales and computes the limit of that ratio as the timescale tends to zero. The good news about this method is that it’s really easy to apply to one dimensional signal like sound.

After that, I used the box counting method of the song’s spectrogram. However, the box counting methods only works for a set of points, not a set of intensities. Therefore I clipped the spectrogram at different thresholds and obtained the following curve representing the estimated box-counting dimension for different thresholds:

Estimation of the fractal dimensions

As you can see, the fractal dimension doesn’t exceed two so this is definitely not a fractal image.

Then, to further test this, I tried the variation method on the sound itself. However, there again, I didn’t get a fractal dimension greater than 1, meaning the sound really isn’t a fractal pattern afterall.

These experiments go on to show that the results from these theorical methods really depends on the implementation used and therefore it’s hard to compare the applied results from two papers using different implementations of the same methods.