1998 - 1999 Research Project.

- Chris Hazard (homepage)
- Catherine Kimport (homepage)
- Dr. David Johnson, Faculty Advisor

Contents:

- Introduction to Fractal Music
- Music from L-Systems
- Music from Fractal Motion
- The Midi File Format
- Bibliography / Thanks

Fractal music is one slice of the study of fractals in general. 'Fractal' is the name given to images, landscapes, sounds, and any other pattern that is self-similar in nature, that is, if you look at one small part, no matter how small, you get a sense of the whole picture.

The possibility of using fractal methods to create music was first mentioned upon the discovery that all music, regardless of culture, followed the patterns of fractal motion or 'pink noise.' Pink noise is somewhere in between white noise (complete chaos, far too disorderly to be considered musical) and brown noise (very orderly, and too dull to sound like music). Thus, the question arose: if fractal methods produce pink noise, and all music resembles pink noise, is it possible to produce music using fractal methods?

This question is the focus of our research.

We used two basic methods to create our fractal music.

The first method is called L-Systems. To briefly describe L-Systems, they create the self-similarity of fractals, starting with a short string of symbols and replacing the symbols with corresponding rules (which are their own strings of symbols that can be replaced). The symbols are then interpreted as notes, chords, and several other things.

The second method involves Fractal Motion. Fractal motion (pink noise) is generated with various random number methods, starting with a straight line and repeatedly altering portions of the line.

These are only brief descriptions of our methods. The daring can learn more by reading further.

The fractal music methods we have used produce a wide variety of songs. Many of our pieces follow the conventions of Western music, but that is only due to constraints we placed on them to add an air of familiarity to our tunes. In several of our pieces, the keen ear can detect some repeated themes and self-similarity inherent in the music.

We did experiment as to what methods and what parameters sounded the best, especially with the fractal motion method. Our findings were that music with a fractal dimension near 1.4 sounded the best (the fractal dimension is a measure of how close to white or brown noise the fractal is). The authors' personal favorite tunes are those generated by the single note L-Systems and the chord progression L-Systems.

An L-System is a recursive method of generating long strings of symbols from a short initial string (or axiom) and a set of production rules--one for each symbol considered in the system. From here, we generate longer strings by replacing each symbol with its respective rule, and repeat this process until we have a string of a desired length.

Here is a simple example:

Axiom: A B

Production Rules:

Production Rules:

- A A B C
- B C A D
- C D C
- D B D B

Start out with the axiom, "A B". After one iteration, the string would become "A B C C A D". Now, we would use the same production rules with this new string. It becomes "A B C C A D D C D C A B C B D B". The results of L-Systems are characterized by repeated themes and self-similarity. L-Systems tend to grow fast, so a small number of iterations is usually sufficient.

After we have generated some data, the next step is to interpret that data as music, which we did in the following three ways:

The most straightforward interpretation is to assign each symbol directly to its corresponding note on the musical staff -- "A" to A, "B" to B, etc., as well as throwing some extra symbols in such as "R" for a rest. Our above string of letters would become this:

Variations on this method include assigning each of the letters to a percussion instrument. To pick our axioms and production rules, we resorted to spelling out words and pulling short excerpts from human-composed pieces.

Another interpretation of the L-System strings is as a chord progression... consider this following system.

Axiom: I

Production Rules:

Production Rules:

- I I IV V I
- ii ii V I IV
- IV IV V I ii
- V V I ii V

After two iterations, this produces a chord progression:

I IV V I IV V I ii V I ii V I IV V I

This method is not very effective when used alone, but is excellent when used in conjunction with other methods, either as background chords or to further constrain melodies to give them more of a traditional Western music feel.

In the Turtle Graphics interpretation, there are four basic symbols, "F", "f", "+", and "-". Instead of being assigned directly to notes or chords, they are interpreted as instructions to "draw" a melody. In the traditional visual interpretation, these control a virtual "turtle" holding a pencil. The commands mean "Move forward one unit, and draw a line", "Move forward one unit, but don"t draw a line", "turn d degrees to your left", and "turn d degrees to your right", respectively. The result is a picture like the one at right.

In our musical interpretation, horizontal motion was seen as note
length, while vertical motion was seen as change in pitch. The above drawing would be
interpreted like this:

This method also had its variations, such as a "trill next note" command as well as a system of marking pitches and returning to that pitch at a later time.

White noise consists of random values the entire distance across. It is of f^{ 0}.

Pink noise is between brown noise and white noise, and is closest to the
differences in music patterns, and can be generated by various fractal
methods. It is of f^{ -1}.

Brown noise is a "random walk." Each point is displaced a Gaussian
(distributed) random amount from the previous point. It is of f^{ -2}.

One method of Brownian motion generation is called random midpoint displacement. This is done by taking the middle of a line segment and randomly displacing it up or down, then each of the line segments made by the displacement are taken in half and displaced by a random amount. This is repeated as far as possible to create Brownian motion.

This method of Brownian motion generation is called the random cuts method. A random point is picked in the line, and half of the line segment from that point is displaced by a random amount. The more cuts that are made, the better the approximation to Brownian motion.

MIDI stands for musical instrument digital interface. It was designed to produce a synthesizer on personal computers, and has made much progress in quality since its beginning. MIDI is essentially a format of sheet music, which a PC sound card interprets.

The Midi data is all stored in one file, chronologically.

Here is an example of how the data is put in a midi file:

Time to Wait | Command | Parameters |

0 ms | Turn on note | Play key of middle C fairly loud |

400 ms | Turn note off | Turn off key middle C |

These two commands together will play a note of C for 400 ms. When translated to data for the computer in base 16, these 2 lines look like this:

0 90 63 70

400 90 63 0

400 90 63 0

The authors would like to thank the following people and resources who assisted in our research:

- Dr. David Johnson, our faculty advisor throughout this year-long project.
*The Science of Fractal Images*, Heinz-Otto Peitgen and Deitmar Saupe, editors.*Fractals: Introduction, Basics and Application*, Przemyslaw Prusinkiewicz and James Hanan.- Glen Dimick, for his crash course in chord progressions.
- The listening test subjects for Brownian motion.

Download the entire collection in .ZIP format (43K)

- Brown2 -- Midpoint Displacement Multifractal with L-System Chords
- Brownian -- Midpoint Displacement Multifractal with L-System Chords
- C3song1 -- Random Cuts Melody
- Cbm10 -- L-System Chords with Random Cuts Melody
- Cbm11 -- L-System Chords with Random Cuts Melody
- D1song2 -- Random Cuts Melody
- Dekking -- Turtle Graphics Melody
- DP -- L-System Notes
- Drums -- L-System percussion feature
- Erie1 -- Brownian Motion Chords
- Erie2 -- Brownian Motion Chords
- Fch3_2 -- L-System Chord Progression
- Hopper -- L-System Notes
- Kochvar -- Turtle Graphics Melody
- multifractal -- Brownian Motion Multifractal
- Peano -- Turtle Graphics Melodies
- Rythm -- L-System Notes
- Sierp0 -- Turtle Graphics Melodies
- Test -- Brownian Motion Multifractal with Chords
- Together -- L-System Notes
- Words -- L-System Notes