mapping to midi
how we converted L-systems to music

[home] [what] [software] [bushes] [microbes] [mucor] [music] [credits]

How we mapped to midi and why we did it that way
We related changes in direction of growth of microbes (as determined by branching angles) to changes in pitch, and distances between branches to note duration. Like Mason & Saffle (1994) we found that the pitch went out of range - MIDI, hearing and instrument range. Unlike them, we could not restrict our interpretation to images within audible range because we wished to explore the usefulness of sonifying them. Therefore we adopted the idea of a circular keyboard as describd below, by modifying a software program lsys2midi, previously written by students under our supervision.

The modified lsys2midi interprets parametric L-system symbols as shown in the table below. For MIDI files, available pitches range from 0 to 127, where the interval between each pitch is a semitone. At first, like McCormack (1996) we interpreted + and - as instructions to increment and decrement pitch by one semitone. However, when the pitch reaches 0, decrementing sets it to 127. So we can consider a pitch of 0 equivalent to that of 128 and picture this in terms of a circular keyboard. This resembles the turtle interpretation of size of a branching angle, where 360 degrees coincides with 0 degrees.

Turtle Graphics & Turtle Sonics
parametric symbols and interpretations in lsys and lsys2midi

symbol graphics (lsys) MIDI (lsys2midi)
F(x) pen down, move forward x note down. hold for time x (play)
f(x) pen up, move forward x note up, hold for time x (rest)
+(x) change direction by angle x degrees left increase pitch by x
-(x) change direction by angle x degrees right decrease pitch by x
Angles of 360 degrees and 0 degrees are equivalent. Similarly, maximum and minimum pitches are equivalent. Maximum and minimum start pitch (default=MIDI 60, middle C) may be specified by the user.
We found two problems with this interpretation. First, MIDI note 127 corresponds to a note of G and note 0 to a note of C. Although this can be interesting, it seems more appropriate to move from B to C ie to specify a pitch range of 0 to 119 (the B before the C of the 10th octave) and regard a pitch of 120 (C) equivalent to to that of 0 (C). Second, the range  from 0 to 119 may not always be appropriate since it is too big a range for most instruments. So we enhanced lsys2midi to allow users to specify the lowest pitch, the highest pitch, and the starting pitch. This means that the same string can be interpreted over different ranges with starting notes of different pitches. In the future we plan to extend the software to include the mapping of other MIDI parmeters.

The methods used have been described and discussed in the following publication:

  • Soddell, Fran & Soddell, Jacques (2000). Microbes and Music. 767-777. PRICAI 2000. Lecture Notes in Artificial Intelligence 1886. (eds R. Mizoguchi and J. Slaney). Springer-Verlag: Berlin

Other approaches
There is no "correct" way of mapping l-systems strings to music. A number of different approaches have been investigated by others. These can be found in the following papers, books or sites:>