# Mandelbrot Music

There are a number of different ways that the Mandelbrot set can be used to generate fractal music. The most straightforward way is to, as with the Henon attractor, follow the iterates of a given point. However, since many points converge to a periodic point or go to infinity after relatively few iterations, this method alone can result in some pretty short compositions.

Another method relies on the same algorithm as is used to produce images of the Mandelbrot set. When producing images, each point c is given a colour value based on how many iterations it takes before heading off to infinity (or is coloured black if it doesn't head to infinity after a certain number of iterations). For Mandelbrot music, we instead assign a pitch in place of a colour. Since we only require a series (or one-dimensional array) of pitches, rather than a two-dimensional array of colours to create an image, only one "line" of the Mandelbrot Set needs to be calculated.

Some algorithms make use of pre-generated images of the Mandelbrot set and calculate pitches based on the colour value of specific pixels. This is essentially the same as the previous algorithm, but with an added intermediate step - namely creating (or at least finding) an image.

The applet below follows the iterates of z=z^2+c for randomly selected values of c. For any given value of c, the function is iterated at most 20 times before a new c value is determined. A new value for c may be selected before the 20 iterations are completed if the modulus of z passes 2 (which implies that z is going to head off into infinity) or if the same pitch is repeated three times in a row. The latter condition is just to keep things from getting dull should we arrive at a fixed point, or a cycle that results in the same pitch being generated over and over.

As with the Henon Attractor, two notes are played simultaneously, one for the real value of z, the other representing the imaginary part. Unlike the Henon Attractor, repeated sequences are relatively common, representing various n-cycles. Also, the range of values has been extended to three octaves of the major scale.

Fractal Music | Home | Improvements & Conclusions