Fractal Tune Smithy home page How the program turns your numbers into a tune Scales of interest to musicians

How the program turns your numbers into a tune

Screen shot from the Fractal Melody program

(Key of A - sharps are in dark blue)

More musical examples , The Koch Snowflake , One way of going inwards to smaller pitch intervals

Click on the red semiquavers to hear the MIDI version of a clip, and on the normal link (usually underlined) to hear it in Real Audio . Click here if you need to Download RealPlayer (look for the free version) .

If your musical seed is 0 1 2 0 ,

it first adds 0, 1, 2 and 0 to each of these numbers, giving:

0 1 2 0 (add 0) 1 2 3 1 (add 1) 2 3 4 2 (add 2) 0 1 2 0 (add 0)

or

0 1 2 0 1 2 3 1 2 3 4 2 0 1 2 0 , (played a little faster)

Then it adds the same pattern again to each of those numbers, to get

([0 1 2 0] [1 2 3 1] [2 3 4 2] [0 1 2 0]) (add 0) ([1 2 3 1] [2 3 4 2] [3 4 5 3] [1 2 3 1]) (add 1) ([2 3 4 2] [3 4 5 3] [4 5 6 4] [2 3 4 2]) (add 2) ([0 1 2 0] [1 2 3 1] [2 3 4 2] [0 1 2 0]) (add 0)

or, leaving out all the brackets,

0 1 2 0 1 2 3 1 2 3 4 2 0 1 2 0 1 2 3 1 2 3 4 2 3 4 5 3 1 2 3 1 2 3 4 2 3 4 5 3 4 5 6 4 2 3 4 2 0 1 2 0 1 2 3 1 2 3 4 2 0 1 2 0 , (faster again)

It can keep on doing this as many times as you like. Here are the next two steps, each one faster than the one before.

32 secs , 1 minute 4 secs .

These clips are for the one you can find at the top of this page. Played on recorder this time.

top

 

More musical examples

If you are musical, you may get a better idea of this by listening to some more examples to hear what it means.

Some of the fractal tunes bring it out particularly clearly.

Here's a string quintet with the first violin playing every note, the second violin playing the note that begins each pattern at the second level, the viola playing the first notes at the third level, and so on down to the contrabass. The pattern is 0 1 0.

Some MIDI players (noteably, old versions of Windows MPlayer) will need a reset to get back to ordinary twelve tone equal temperament.

Play: B flat then c . Now play Two notes . Do you hear the same note (middle c) twice? If so your player is okay.

If you hear two pitches, you can upgrade your player to one with automatic resets

Windows Media Player (it's free) :)

Alternatively, play Reset after listening to the clips. More details.

Here is the 'score'

Key: 1 = first violin, 2 = second violin, 3 = viola, 4 = cello, 5 = double base.

Vertical lines show seconds.

marimba with string quartet is the same as string quintet , with a marimba for the top line, and changes to the volumes of the notes in the tune, and the durations of the notes in the top line.

You might also like to listen to major and minor scales fractal ( [200 Kb] ), for a more complex pattern. The recorder is playing it exceedingly fast at the top, then glockenspiel, wood block, and church organ follow at increasingly slower speeds. It takes some time for the church organ to change a note - more than two and a half minutes, so it plays a single note for the whole of this clip. The pattern is modulating back and forth through major and minor keys all the time and is meant to suggest some natural sounds, like the wind, as it can be on occasion.

When you listen to some of the other sound clips, the structure might not be so apparent. You can use the program to distribute the notes of the fractal tune amongst the instruments according to various methods. Also you can choose 'scales' which instead of ascending in a regular way, have some steps up, and some steps down. Effects of timings and dynamics, changing the instrumentation (such as mixing percussive and lyrical instruments), and shifting instruments for the parts up and down in pitch also add to the complexity of the resulting composition.

In fact, several of the compositions also use identical note height patterns, but with variations of timing, choice of scale, instrumentation and dynamics. For instance, flute , flute2 ( [107 Kb]), music box , and piano improvisatio all use the pattern 0 1 2 6 0.

top

 

The Koch Snowflake :

The mathematical connection is with fractals of the type of the Koch snowflake:

There is a good introduction to the koch snowflake at this site: Fractals (introduction for kids - also suited for interested non mathematical adults

A fractal tune with pattern 0 1 0:

(treble clef, pentatonic scale, scale of A, sharps in dark blue)

Notice that the highest note in the melody increases with each step.

Two steps after the last frame in the animation, as a graph. This time in the whole tone scale, to give equal spacings in pitch between the notes.

This is part of it in the whole tone scale played very fast on pizzicato strings.

As you play the melody over larger and larger spans of time, you find that the melody almost repeats, but never repeats completely until you reach the end of the cycle, which could be many hours or even days, depending on the number of levels you choose to iterate.

The fractal melodies are like the Koch snowflake, but you build them up outwards rather than inwards, because it works more easily that way in music.

You can't go inwards to smaller and smaller details so easily in music because there are minimum pitch intervals between notes in the usual types of scale. However it can be done with unusual scales..

top

 

One way of going inwards to smaller pitch intervals

One can make scales with indefinitely small intervals, in an attempt at a closer parallel to the geometric case, and they can be interesting.

Try a scale with steps of an octave, then a third of an octave, then a ninth of an octave, and so on, or in cents:

0 cents 1200 cents 1600 cents 1733.333333 cents 1777.777777 cents 1792.592592 cents, ... (approaching 1800 cents and never quite reaching it).

The seed is 0 1 0 as before.

.

As you add extra notes between each one shown, the space beneath the curve remains clear, apart from some notes very close to the ones shown. The space above the curve shown eventually fills up with lines, as between any pair of notes you can find another one as close as you like to 1800 cents - one and a half octaves above the first note of the scale. It's not a continuous curve, but it has a type of exact self similarity. Can you see that the whole pattern is echoed in it's centre third? Also each third is echoed in its centre third? Can you see how the echoes continue to smaller and smaller copies?

The self similarity is of the same general type of pattern as the Koch snowflake, fractals with exact self similarity. The method of construction is similar too, adding identical smaller copies of a pattern to each of it's components. One could perhaps more exactly call this fractal the musical equivalent of Cantor's dust (Maths Encyclopedia entry).

Cantor's dust is what you are left with if you start with a line, remove the middle third of that, the middle third of each one left, and so on. The lowest notes of the fractal play out Cantor's dust. You have to suppose that each note that you hear is divided yet further into smaller notes. Cantor's dust has the paradoxical property of having no total length, yet having as many points in it as the complete line (see the Maths Encyclopedia article for details).

The higher notes show the result of doing another Cantor's dust construction on each of the middle thirds that was removed at every stage, then another one on each one of those, and so on. Eventually, every point in the line is reached by this method, so it's a way of filling the line by repeating the Cantor's dust construction infinitely often.

This is what it sounds like played on a marimba , with the notes quite fast. There would need to be many more notes between each of the ones played, indeed, infinitely many.

Notice the self similarity of the rhythmic patterns. Try listening to one of the pitches of notes only. Can you hear that each of each pair of low notes is in fact double. They are too close together to see as separate notes in the picture.

top