Help for Tune Smithy Koch snowflake icon.gif

Seeds and fractals

From Tune Smithy

Jump to: navigation, search

Prev. - Up - Next



tune_as_score.png (Key of A, sharps are dark blue)

Click on the red semiquavers to hear the MIDI version of a clip, and on the normal link (usually underlined) to hear it as an mp3.

Here is a quick intro to the idea. I go through it again a bit more slowly in the section Music by numbers

If your musical seed is 0 1 2 0 midi clip for 0 1 2 0 played on recorder , 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 midi clip for 0 1 2 0 1 2 3 1 2 3 4 2 0 1 2 0 played on recorder , (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 midi clip for 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 played on recorder , (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 32 sec midi clip played on recorder , 1 minute 4 secs 1 minute 4 secs midi clip played on recorder . These clips are for the tune you can find at the top of this page. Played on recorder.


Passing tones

It's based on the idea of passing tones (link opens in new window) . These are notes that appear in a melody that are incidental to the harmony. For instance a melody may contain a scale passage C D E F G where the D and F are passing tones added to make the melody flow.

Here is a short (not a fractal) tune to illustrate the point. All the notes on the beat are from the C major chord, and nearly all the other notes are passing tones. This is a midi clip.

Passing tones example

If you want to see it as a score here it is: score (opens in new popup window)


Fractal tunes entirely made of passing tones from unison

In the original fractal tunes,this passing tones idea is used throughout.

In the original fractal tunes from the earliest versions of FTS, you can say that, in a way, the harmony is just the unison, and the entire tune consists of passing tones from the original unison that starts up the entire tune. Or at any rate - if perhaps the ear hears other harmonies in the tune, this is the simple idea that informed the algorithm that is behind it all.

The fastest, lead instrument plays a seed phrase as passing tones away from the unison (or octaves) held by all the other instruments.

The second instrument plays the same seed phrase, but more slowly. As the tune continues, the second instrument plays a new note for each entire seed of the first instrument.

The lead instrument plays all its seeds as passing tones away from the notes played by the second instrument, and these in turn are again passing tones away from the unison. So it is playing a second generation of passing tones if you like.

The third instrument plays its seed slower still, and by the time it's melody gets underway, the second instrument is playing its seed as passing tones over every note of the third instrument.

So by now the first instrument is playing passing tones over each note of the second instrument, which in its turn is playing passing tones over each note of the third instrument, which in turn is itself playing a passing tones over the original unison that started it all off. So by now we have four generations of them, or Layers as they are referred to in the Tune Smithy help and interface.

And so it goes on.

It turns out that this way of making the fractal tunes automatically leads you into a canon by augmentation. In fact you may recognise this description as somewhat the reverse of what you have already seen on the Endless page (if you have read that). There we tried removing one instrument at a time and speeding the tune up, in a tune where each part played one of the layers. Here we are looking at how the tune is built up from a single seed one layer at a time


Music by numbers

The original tunes, way back in the very first release of that rudimentary FTS 1.0, consisted of just a single melody line. It is actually quite useful to start that way to see how the whole melody depends on the seed.

So - let's see an actual example of it in action.

The simplest example starts with the unison - then you play a single passing tone away from it, then return to the original note. This is actually the seed idea that lead to the invention of FTS in the first place - this is the fractal tune I sketched out before I had access to a multimedia capable computer to generate it on, way back some time in the 1980s whenever it was (don't actually have a record of when it was exactly, but pretty sure it was in the 1980s, probably before 1987, and after 1982).

We want to be able to do this in any tuning, so rather than use C D etc for the notes, we use numbers. Also we want to start with 0 rather than 1 as that helps when you add the seeds together. So for instance if our tuning is the pentatonic scale C D E G A c ... then the number 0 plays C, 1 plays D, 2 plays E, 3 plays G, and so on.

Use 0 for the unison. Then 1 for one note away from it. Then our seed phrase is 0 1 0.

Here it played on a flute (midi clip):

0 1 0

This will be our slowest layer in the tune, just a single seed.

Now play it more slowly and add a passing tone on each of those notes, and you get:

[ 0 1 0] [ 1 2 1] [ 0 1 0]

(original notes shown in bold)

Here it is played, with the original notes highlighted using a Glockenspiel:

0 1 0 - layer 2

Arithmetically all we have done is to take the 0 1 0 pattern and added that pattern to each of its own numbers, so we do

0 + (0 1 0 ) , 1 + (0 1 0), 0 + (0 1 0).

This is our slightly faster layer.

Now we just repeat the process as many times as we like.

So - we play the resulting tune even more slowly, and add passing notes again on each of its notes, and you get:

[ 0 1 0, 1 2 1, 0 1 0], [ 1 2 1, 2 3 2, 1 2 1], [ 0 1 0, 1 2 1, 0 1 0]

(previous later notes shown in bold)

Here it is played:

0 1 0 - layer 3

Again with the notes of the previous layer highlighted using the Glockenspiel.

Or arithmetically, it is

0 + (0 1 0) , 1 + (0 1 0), 0 + (0 1 0), 1 + (0 1 0), 2 + (0 1 0). 1 + (0 1 0), etc. - adding 0 1 0 to each of the notes of the previous layer.

Here it is again, with yet another layer added, and this time I've done different instruments for each of the layers, so if you listen to each instrument in turn, you may be able to pick them all out, not just the last two. Also I've varied the volume and tempo just a bit, using the options in Tempo & Volume variation window, because I felt it made it more interesting rhythmically - more kind of irregular and a bit organic.

0 1 0 - layer 4

For those who have already downloaded FTS - if you want to get that example as a fractal tune to go on changing it yourself, here it is: 0 1 0 - layer 4 - as Tune smithy file

(as it is, it will keep repeating because it only has four layers - to increase the layers go to your Composing task and look for the Layers field in the main window).

So it goes on. We could go on endlessly. FTS actually does at most 50 layers, and it numbers them in the reverse order so the fastest layer is the first one, but with that many, then usually even if you play the tune for hours (and most often if you play it for years even) the whole tune so far usually remains well within the very first note of the fiftieth layer.

Then - as we have already seen with the last clip, a simple way to make this into a tune with several parts playing simultaneously is just to let one of the instruments play each of the layers of construction of the tune.

So - that's what I did, later on, with the string quintet - here you will hear five layers all played simultaneously

String Quintet

You do this using Parts | Order of Play | Choose Parts by Layer.


Visual connection - Koch snowflake and Cantor's dust

See: Visual connection - Koch snowflake and Cantor's dust

This is a kind of musical fractal

So this is a kind of musical fractal. If you ignore the passing tones at the fastest tune speed, then the tune sounds exactly the same when you play it three times faster.

In the case of the visual fractals, then as you go to more and more detail, the details get smaller and smaller until you can't see them in the original image.

The musical equivalent of that would be to make notes that use smaller and smaller pitch steps. That's interesting in its way too, but sound works a bit differently from vision, and e.g. quarter tone steps in a twelve tone piece, rather than being less noticeable than the original larger steps, tend to stand out as not belonging to the original harmony.

The whole thing is musically inspired. The reason for doing it this way is that the resulting tunes make musical sense and seem somehow inspiring and refreshing. I've always kept that as my guideline when adding new features to the fractal tunes as well.

The surprising thing is that the resulting music sounds so much like conventional compositions really, to the extent that sometimes composers remark that it seems almost like cheating to use something like FTS to compose. Yet the tunes are all constructed basically using this very simple process, by repeatedly adding seed numbers together, which is so very unlike the way that conventional composition is done that it is remarkable that it can sound as conventional as it does.

When I first got the idea for the seeds way back in the 1980s, I'd have been totally astonished if told where it would lead. It just seemed an intriguing idea to follow up, and I wondered, out of curiosity really, what a fractal tune of that type would sound like. If told at the time that I would spend many years of my life writing a program to generate such tunes, I'd have been amazed.

There is no musical intelligence or understanding of composition processes built into the program really. The reason it works must be something other than that.

I wonder about why the tunes in FTS work at times. Seems to be pointing to some deep affinity of the mind and music to fractals perhaps, after all conventional composition does use fractal like structures to build up the music too- but not in quite this way to my knowledge.


Fractal Pitches

You may be interested to hear some music with a fractal pitch structure as well, just to hear what it is like.

Here are a couple of examples.

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.

geometric_series_scale_a.gif |Geometric series tune - a fractal pattern of large and small arches one after another, the smaller arches form the detailing within the larger arches]]

(to see how it continues see this popup)

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 midi clip of geometric series scale played on marimba (link for mp3, semiquaver icon for midi clip), 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.

(IN PROGRESS - to add - more fractal pitch structure exs)


Fractal Rhythms

The rhythmic units are more easily fractal, there is no problem with making shorter and shorter notes, and very short notes, as for vision, become so short as to be barely noticed as individual notes in a fast tune. So the fractal rhythms are fractal in the ordinary sense.

Fractal rhythms are done so that the each part has to keep speeding up or slowing down, to play its entire seed within each note of the next slower part. The result then as before is a strict canon by augmentation, with the rhythm of the first part also followed by all the instruments, just at varying tempi.

So - some of the fractal tunes use completely fractal rhythms in this sense. They are characterised often by what one hears as continual changes in the tempi. Others just use a rhythm fractal for the first two layers say, or only the first layer of augmentation plays the rhythm and the rest just play the same melodic line, but with all the notes the same length, so giving a sense of a more steady tempo.

Here is an example of a very fractal rhythm.

(IN PROGRESS - to add - fractal rhythm ex)

Personal tools
How to use the wiki