Fractal Sequences As Sound

droppedimage-filtered

Audacity's "pitch" view of a fractal .wav file

Inspired by this article on CDM, and Terran Olson’s work in particular, I dug into creating a more general version of the fractal set synthesis outlined in this article.

I’ve posted the code, and some example .wav files, linked below.  It’s a simple, cross-platform C++ command line utility that takes a binary seed for the sequence, and two recurrence relations (the first specifies what replaces a ‘1′, the second replaces ‘0’s).

For example, the arguments ‘1 101 000′ yield the Cantor Set:

1
101
101000101
10101010001010101
… and so on

This sequence is iterated enough times to end up with enough samples to generate 10 seconds of audio — which is dumped to a .wav file. ‘0101′ repeated would become a 22.05kHz square wave, for example.  In fact, all the output from this program will be square waves of varying wavelength and pulse width.

Here’s an audio clip of what ‘1 101101 00000′ produces (careful, these are loud):

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

101101_00000 (.wav file)

You can provide any binary pattern you want, and it expands into a recursive fractal sound.

Here’s the link:  genfractal.zip (cross-platform C++ source code, and examples)

0 Response to “Fractal Sequences As Sound”


  • No Comments

Leave a Reply