You are on page 1of 9

L-Systems, Melodies and Musical Structure

Author(s): Stephanie Mason and Michael Saffle


Source: Leonardo Music Journal, Vol. 4 (1994), pp. 31-38
Published by: The MIT Press
Stable URL: http://www.jstor.org/stable/1513178
Accessed: 02-05-2017 16:13 UTC

JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of content in a trusted
digital archive. We use information technology and tools to increase productivity and facilitate new forms of scholarship. For more information about
JSTOR, please contact support@jstor.org.

Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at
http://about.jstor.org/terms

The MIT Press is collaborating with JSTOR to digitize, preserve and extend access to Leonardo Music
Journal

This content downloaded from 155.246.163.146 on Tue, 02 May 2017 16:13:29 UTC
All use subject to http://about.jstor.org/terms
..
T E C H N I C A L A R T I C L E

ABSTRACT

L-Systems, Melodies and Musical


Among musical sy

Structure and self-similarities


can be produced using
Lindenmayer-system (L-system)
curves to generate melodies and
rhythmic patterns. In 1986,
Przemyslaw Prusinkiewicz intro-
Stephanie Mason duced a simple method of pra
ducing relatively complex musical
and Michael Saffle scores that incorporate a legible
internal structure. Using a
scheme called edge-rewriting}
one of the authors} Stephanie Ma-
son, has extended Prusinkiewicz's
methods to generate melodies
and polyphonic structures that
Symmetries and self-similarities abound in the strated at 'CExpo 8S, held in conform to traditionai Western ex-
pectations. By stretching certain
world of geometry, and a great deal of music also shares these Tsukuba,Japan [7].
L-system curves, she has also du-
properties. Throughout the nineteenth and twentieth centu- Among musical symmetries
plicated melodic phrases associ-
ries, historians and theorists have discovered musical self- and self-similarities that can gen- ated with hundreds of pre-existing
similarities of various kinds. These include the micro- and erate muslc trom recurslon works by classical and popular

macrolevel "bar" forms that Alfred Lorenz discovered in schemes are those associated with Western composers. The authors
discuss the possible link between
Wagner's music dramas [1]; the recurrent melodic and har- Lindenmayer systems (L-sys-
the perception of musical beauty
monic background patterns in European art music of the tems): recursive, string-rewriting and the fractal or quasi-fractal
eighteenth, nineteenth and early twentieth centuries discov- systems in which all symbols are character of music associated
ered by Heinrich Schenker [2] and other Schenkerian theo- rewritten in parallel and simulta- with L-system curves.

rists; rhythmic patterns discovered by Leonard Meyer and his neously (whereas Chomsky gram- - l - --

colleague Grosvener Cooper [3]; and generative organiza- mars are rewritten sequentially).
tional patterns in tonal music, discovered by Fred Lerdahl Named after Aristid Linden-
and RayJackendoff [4]. With the exception of Lorenz, all of mayer, L-systems were initially conceived to describe growth
these individuals also believe that anticipation/response patterns in biological organisms [8]. All of the L-systems dis-
models of musical structure help us understand musical per- cussed in the present arecle are DOL-systems (deterministics
ception. Several of the music theorists mentioned later in this context-free Lindenmayer systems) [9] .
article also draw upon anticipation/response models of me- The purpose of this article is to demonstrate how Irsystem
lodic construction and analysis. curves can be used (1) to generate melodies that are "listen-
Mathematicians and composers have also attempted to able" to Western ears i.e. melodies that conform to familiar
generate musical compositions using at least three kinds of Western melodic expectations, a concept discussed at some
automated mathematical schema. Kevin Jones, for example, length below and (2) to study important aspects of self-simi-
has experimented with a stochastic generative scheme useful lar musical structure. Of course, the application of L-systems to
(by his own admission) primarily within the realm of com- the study of fundamental musical issues can only be discussed
puter rather than what he calls "artistics' musical composition below in highly abbreviated form. Many possible applicaiions
[5]. (Jones has also discussed Chomsky grammars. These or- of our work have not yet been thoroughly explored. These in-
ganizational paradigms are related to L-systems; both are clude the use of L-systems to generate rhythmic as well as me-
string-rewriting systems, but Chomsky grammars have been
invoked to produce musical results different from those we
Stephanie Mason (mathematician) 5340 Thayer Avenue, Alexandria, VA 22304, U.S.A.
discuss in this article.) Charles Ames has written ;'Crystals"
Michael Saffle < musicologist3, Department of Music, Virginia Polytechnic Institute and
and several other compositions with mathematical modeling State University, Blacksburg, VA 24061-0240, U.S.A.

schemes that he invented using ideas derived from Gestalt Received 29 February 1994.

psychology [6]. Finally, Lejaren Hiller, Ames and Robert Preliminary work on the present article appeared as S. Mason, "Lindenmayer Systems

Franki designed and installed an automated computer and Space-Filling Musict Resevrsh Repor: (;C(;44 of the University of Minnesota Georn-
etry Center (September 1992) pp. 9s103. Portions of the research reported in this ar-
scheme used to assemble complex musical structures ranging ticle were subvented by grant number NSF/DMS-8920161 of the National Science
Foundation.
in style from popular to avantsarde. This schema was demon-

Fig. 1. Geometrical
renditions of Peano
curve Lrsystem
strings. The irst (a)
iteration is sel-simi-
lar with the second
(b) and third (c) it-
erations.

(a) (b)
)c(

t 1995 ISAST LEONARDO MUSIC JOURNAL, No. 4, pp. 31-38,1994 31

This content downloaded from 155.246.163.146 on Tue, 02 May 2017 16:13:29 UTC
All use subject to http://about.jstor.org/terms
18 I: (S4)j ; T
lodic patterns and the use of L-systems to
rules to draw a figure a curve, in the cates the number of degrees the turtle
generate and study nontraditionalcase ofand
our discussion [10]. The turtle turns
is [12]. Consider the so-called Peano
non-Western melodies and musical struc-from Logo@, a language devel-
borrowed curve, named for the Italian mathemati-
tures. We hope to be able to discuss
opedL-sys-
at Massachusetts Institute of Tech-cian Giuseppe Peano (18M-1932). The
tems and music at greater length in subo
nology (MIT). The turtle can be L-system that generates the Peano curve
sequent publications. thought of as a pen that can be turned may be described as follows:
on and off [11]. An L-system consists of
Axiom: X
an initial rule or axiom, additional rules
LrSYSTEMS a=90
that are substituted for the axiom when
To assist in visualizing the geometrical the L-system is iterated, an alpha valueRules: XeXFYFX+F+YFXFY-F-XFY
realization of L-system strings, we make (a) that denotes the direction the turtle Yo YFXFY-F-XFYFX+F+YFXFY
use of an imaginary turtle that follows is facing and a delta value (6) that indi-
The first iteration of the L-system s
stitutes the axiom Xfor the rule fo
yielding
Fig. 2. The first iteration of the quadratic Gosper curve can be read in terms the
of four string XTYFX+F+YFXF
rotations
to produce eight different musical motifs. The rotations pictured here (a)XFYFX For from
are derived the second iteration, th
the 0.0 turtle heading (1). Readings 1, 3, 5 and 7 proceed in a forward direction; 2, 4, 6 in
string created andthe
8 first iteration is
are backward readings. (b) The original and seven variant musical readings based on these for-
stituted; thus each Xis replaced by th
ward and backward readings of the original curve. In each case the initial note is read as C and
rhythmic moves are transcribed as eighth and sisteenth notes. rule and each Yby the Yrule, produ
the string

XFYFX+F+ YFXFY-F-XFYFXFYFXFY-
(2)
X F Y F X + F + Y F X F Y F X F ; Y F X + F + . . .

Finally, each iter


scribed into a ge
the following rule
X (;) moves forward o
(1) for all curves in t
the turtle changes
x + d cos a and y'=
m
draws a line betw
_ _ L For each plus sign,
(8) + wise by the angle
turtle is (x, y, a-
- (5) counterclockwise
the state of the tu
+ 6). For our purp
(7) [ ters are ignored b
LrL Y in the example)
(a)
The strict mathe
an L-system can b
(6)
Przemyslaw Prusin
(1) Original
(2) Original

CREATING M
ARw F3221 L=SYSTEMS
Prusinkiewicz ha
(3) 90 degree clockwise mtation for creating music
(4) 90 degree clockwise rotation
[15]. This method

418-i a J z
horizontal lines of

e f n : J 7 -r;L notes and the verti


vals between note
tal F (or move for
(5) 180 degree rotation (6) 180 degree rotation read as a single u
sixteenth note, eig
fw
A

duration desired.
9 EJ J , move
terval
up
between
or down)
n
whole-step or any
(7) 270 degree clockwise rotation
(8) 270 degree clockwise
within a given mo
^
tion is made betw

f? ? W and right (0.0 direction) in Prusin-


kiewicz's reading of curves, so the melo-
(b)
dies generated always travel forward in

32 Mason and Saffle, L-Systems, Melodies and Musical Structure

This content downloaded from 155.246.163.146 on Tue, 02 May 2017 16:13:29 UTC
All use subject to http://about.jstor.org/terms
25 ^
z * tion is played forwards and backwards si-
multaneously.
2:0 r Other modifications to L-system melo-
20 -
dies are also possible. Individual curves,
15 . for instance, may be read in terms of un-
15 -
usual or possibly non-Western musical
scales and modes, as Prusinkiewicz has
tt- suggested [17]. Thus, one can use the
curves to produce melodies or contra-
S. 5 puntal passages that replicate musical
styles particular to certain cultures or

O o historical periods [ 18] . Horizontal


-

moves forward can also be assigned pro-


o 5 1 0 15 28 25 -= -20 -15 -t 0 _5
portional durations of various kinds,
(a)
(b) producing striking rhythmic patterns or
even an absence of rhythm (achieved by
assigning the same duration to all hori-

is rln.C; s;;17>
zontal moves).

i(& Fig. 4. L^system curves and self-similarit,v.


(a) The first iteration of the quadratic
Gosper curve (0.0 direction) is not fractal,
(c)
because there are N=b2=52=25squares in
Fig. 3. Producing counterpoint with the quadratic Gosper curve. Two iterations of the the grid, and each square is r= 1/D = 1/5 the
curve, starting in 0.0 (a) and z/2 (b) directions, can be read simultaneously starting at length of the side of the grid. Thus,
their respective (0,0) coordinates to produce a two-part canon (c). Again, the initial notf e in D=log25/log(1/(1/S)) =log25/logS=2. (b)
both cases is C and rhythmic moves are transcribed as eighth and sixteenth notes. Bounded and unbounded curves. Notice
that the curves begin and end on the same
level, as indicated by the arrows. Each edge
representing a forward move by the turtle
is denoted by a tick mark. The quadratic
time, even when the turtle is moving left. Each of the curves beginning with c Dne Gosper curve on the left is bounded be-
Each forward move up (z/2 direction) of these turtle headings can also be cause every square in the grid is marked.
shifts the note being created up one in- played forwards and backwards, t} hus Ovals indicate the areas where two of the
terval from its predecessor. Similarly, yielding a total of eight melodies, unl less squares cannot be marked for the curve on
each forward move down (3X/2 direc- the original curve is a palindron me the right; thus, the right-hand curve is un-
tion) shifts the note being created down (Other variations are also possible, in bounded. (c) The second iteration is com-
prised of copies of the first iteration in the
one interval from its predecessor. cluding mirror images. We have not cl
*on- direction of marks as indicated in (b).
If a curve begins with a horizontal sidered such variations in our work.) > In Thus, the second iteration is self-similar
line, the pitch of the first note is as- this paper we will refer to the four rc ota- with regard to the first.
sumed to be the first note of the chosen tions traversed forwards and backwa lrds /I r
scale or mode; only the duration for the as the eight rotations of the curve. Ma ath- / LA
first note is taken from the curve. The ematically, all eight curves are rotatiz ons 5 <
pitches and durations of the rest of the of each other. Musically, all eight mc elo- \ :X)r=1/5
notes are read from the curve. If a curve dies generated by these rotations . are \ X
begins with a vertical line, the first note transformations of each other (Fig. 2 * /
). (a)
can be read as the number of forward Musical counterpoint can also be g ,en-
moves up or down from the first note of erated by reading two or more rotati( ons
a given scale or mode. Similarly, the of the same curve simultaneously to c cre-
number of forward moves used to create ate canons, or by reading two or m ore
the horizontal line determines the different curves simultaneously to cre ate
note's duration. (Prusinkiewicz does not multi-melodic structures. For examy ple, :
mention curves beginning with vertical if the second iteration of the quadrb atic
lines, but this application of his prin- Gosper curve is drawn with two differ ent > o ^
ciples seems to be consistent with his turtle headings say, the 0.0 and s/2 ' di-
(b)
method as a whole.) rections and the melodies general ted
FASS curves (space-fwllling, self-avoid- from these iterations are played simu lta-
ing, simple and self-similar curves) [16], neously, a "right-angle canon" is p ro-

fractal curves, and other curves contain- duced (Fig. 3). All musical readings c of a
ing 90 angles can be used to generate curve (i.e. all of its rotations) are s elf-
melodies of unlimited length. A curve similar, and certain curves produce es-
with 90 angles can be drawn in four pecially striking self-similarities. The l Hil-
unique directions in the Cartesian coor- bert curve (named after David Hilb ert

dinate plane: 0.0, ?mv/2, ?mv, and 3?TV/2 [1862-1943]), for example, produl Lces
5 10 IS 2e 5

(sometimes called "turtle headings"). palindromic pieces when the same rc ata-
(c)

Mason and Saffle L-Systems, Melodies and Musical Structure 33

This content downloaded from 155.246.163.146 on Tue, 02 May 2017 16:13:29 UTC
All use subject to http://about.jstor.org/terms
moving in either the 0.0, X or 3X/2 di-
i>( t715 rection. Now trace the curve as if the
turtle were drawing it. If the edge the
(a) turtle is drawing has a left mark, record
an L; if the edge is marked on the right,
record an R. Indicate + and - when

i; J. DJ. DIJ DJ bIJ D;. j12 turning. After traversing the curve, the
turtle should then be turned to face the
z/2 direction. To design the right rule,
(b) follow the same procedure but enter the
Fig. 5. Two structurally similar melodies: (a) the subject of Bach's Fugue in G minor, BWV curve at the other end.
542, showing the sawtooth shape related to the Peano curve illustrated in Fig. 1, and (b) 4. The axiom is L, since the left rule
the opening of the melody of "Tea for Two," which shows the same shape.
originates from the traversal of the
curve. The system thus constructed may
be iterated as many times as desired. Af-
SACTAL MELODIC
Whether the turtle moves left or right, ter all the iterations have been com-
STRUCTURES the melody produced will always move pleted, convert the L and R symbols to E
Each subsequent iteration of an L-system forward in time. Curves that remain The curve can now be drawn by the
curve is a fractal production (i.e. the sec- bounded but intersect themselves (as turtle and read as music in terms of any
ond iteration of a given curve is a combi- many fractals do) are, therefore, consis- rhythm or scale desired.
nation of the eight rotations of the first tent with Prusinkiewicz's method. The fractal process can be illustrated
iteration, which in turn can be read mu- with the edge-rewriting process. A copy
sically in eight different ways; the third of iteration n-l is placed on each edge
EDGE REWRITING
iteration is a combination of the eight (in the direction of the tick mark) of it-
rotations of the second iteration, and so
TECHNIQUES AND SACTAL
eration n (Fig. 4c).
on). Some of the curves derived from L- MELODIES
systems are fractals, since they have a di- Prusinkiewicz and Lindenmayer created
mension D not equal to an integer, ac- a process called edge-rewriting to con-
LSYSTEMS AND LODIC
cording to Mandelbrot's formula struct L-systems for FASS curves [22]. IMPLICATIONS
For our purposes, curves can intersect Any melody can be modeled with an L-
D=log N/log ( l /r),
themselves; therefore, an adapted edge- system, including the songs of aboriginal
where a "straight interval of unit length rewriting technique was chosen for use hunters, the plainchants of the Medieval
may be divided into N=b subintervals of in our own work in generating and Christian liturgy, the themes of
length r=l/b" or "a unit square can be studying melodies and related musical Beethoven's symphonies and popular
divided into N=(b2) squares of side r=l/ structures [23] (Fig. 4b). To employ this song tunes. A given melody can be mod-
b" [19]. A snowflake curve [20], for ex- method, eled with an L-system by simply drawing
ample, has a dimension of 1.63. FASS 1. Decide on the size of the grid that a curve that depicts the notes of the
curves, on the other hand, have a di- the first iteration, or original melody, is melody and deriving the rules for L-sys-
mension of 2, since at time infinit,v they to stay bounded in. A smaller grid allows tems explained above. But drawing a
fill the plane (Fig. 4a). But even though for more iterations, but the original curve to depict an existing melody
FASS curves are not fractal according to tune will of necessity be shorter and less merely rewrites that melody in math-
Mandelbrot's formula, L-systems and musically variegated. A larger grid ematical terms. More interesting, we be-
the curves that are produced by them makes possible a tune of greater length lieve, are the melodies and contrapuntal
exhibit many fractal properties, such as and diversity, but the tune will grow out structures generated directly by reading
self-similarity at different scales [21]. In of range with fewer iterations. L-system curves in musical terms. Not all
order to use L-systems to produce plau- 2. Draw the curve in the grid. It is im- of these tunes and polyphonic pieces are
sible fractal music tunes and contra- portant that the curve begin and end on equally successful but they are often at-
puntal passages that can be sung by hu- the same level. To guarantee that the tractive and always more or less musical.
man beings or performed on curve will be bounded, every square of In order to listen to music produced
conventional instruments and that ex- the grid must be filled when the curve is by L-systems, Stephanie Mason wrote
hibit fractal properties such as self-simi- iterated. To see if the curve satisfies this computer programs in which at least two
larity other conditions must also be condition, draw a left or right tick mark curves or two turtle headings of the
met. It is vital, for instance, that each it- on each "edge" of the curve; each for- same curve were read simultaneously as
eration of a curve be bounded. If it is ward move of the turtle is considered an music and recorded on magnetic tape
not, notes will be generated that are be- edge. There must be one and only one [24]. In most cases the curves were read
yond the range of conventional instru- mark per box of the grid for the curve to in terms of a C-major scale and "long/
ments and the human voice even be- be bounded. short" rhythmic patterns, in which one
yond human hearing. Because of the 3. Next, write the "left" and "right" horizontal F was read as a sixteenth
way Prusinkiewicz chooses to read L-sys- rules that will be substituted when the L- note, two Fs as an eighth note, and so
tems as music, all reiterated curves will system is iterated. To design the left on. The results were generally effective,
eventually generate unsingable and rule, start at the left end of the curve. If although not entirely conventional. In
unplayable melodies. However, the ques- the curve does not start in the z/2 direc- Fig. 3, the opening measures of one
tion of whether curves intersect is not tion, turn the turtle with the appropri- such recording are presented in conven-
significant from a musical point of view. ate + and - symbols so that it will begin tional notation. Some of the sound re-

34 Mason and Saffle, L-Systems, Melodies and Musical Structure

This content downloaded from 155.246.163.146 on Tue, 02 May 2017 16:13:29 UTC
All use subject to http://about.jstor.org/terms
cordings made by Mason were used in a sic is, in some essential sense, fractal in important theoretical piece by Charles
videotape program about the activities its melodic material and internal self- Adams [33]. Brief reviews of melodic
.

of the Geometry Center of the Univer- similarlty. theories by these and other researchers
sity of Minnesota. Others are available may be found in reference works such as
electronically through an MIT Press file The New Harvard Dictionary of Mtbsic [34]
THEORIES OF MELODIC
server [25]. and The New Grove Dictionary of Mtbsic and
Even more interesting than new L-sys-
ORIGINS, SHAPE AND Muszcians [35].
tem melodies and contrapuntal pieces, STRUCTURE The earliest known melodies are
at least to students of music history and Music theorists who have examined the widely believed to have originated from
theory, are correspondences that seem melodies of various cultures and eras speech patterns, and the risings and
to exist between musical compositions have generally been interested either in fallings of many tunes are fundamen-
and L-system curves. The second itera- determining the origins of certain kinds tally speechlike. But the origin of such
tion of the quadratic Gosper curve with of tunes or in devising systems for classi- tunes does not account entirely for their
turtle heading 0.0, for example, gener- fying tunes according to fundamental appeal. Gregorian chants, for example,
ates interval patterns strikingly similar to shapes. Published studies of melodic ori- may have begun as inflected recitations
Bach's Invention No. 1 [26] (Table 1). gins include books and articles by Lach of liturgical texts, but the chant tunes
Other L-system curves generate tunes [27], Herzog [28], Szabolcsi [29] and themselves are admired and enjoyed by
that are similar or even identical to hun- Nettl [30]. Published studies of funda- many individuals who are not Catholics,
dreds of existing melodies by classical mental melodic shapes include Eugene and even by some individuals who are
and popular composers. Aspects of cer- Narmour's work on "basic melodic struc- neither European nor American and/or
tain theories about the origins and fun- tures" [31] and several articles, includ- who cannot understand the Latin texts
damental structures of melodies suggest ing "how-to-compose" advice pieces by from which the tunes seem to have been
that much perhaps all beautiful mu- William Fowler [32] and an especially derived. Whole families of melodies are
believed to have evolved, sometimes
over centuries, from fundamental musi-
cal figures such as the pentatonic scale.

Table l.The right-hand part of Bach's No. 1 and the second iteration of the These families include both Western
quadratic Gosper curve contain almost the same number of notes. The percentages and non-Western melodic repertories,
of intervals occurring in both are almost identical (with one notable exception: the
among them traditional Asian and Indo-
Gosper curve cannot be read in terms of large intervals or repeated notes).
nesian tunes. This last theory helps us
Right Hand of Bach's No. 1
understand how such families have de-
Interval Length Number Percentage veloped historically, but it fails to ex-
in Half-Steps of Occurrences of Occurrences plain why individual tunes are admired
o 1.69 and enjoyed by so many individuals with
4
1 20.76 various cultural backgrounds.
49
2 42.37 Adams's work on melodic contour
100
3 16.95 typologies explains how melodies can be
40
4 7.63
18 understood according to classifications
5 2.97
7 suggested by several theorists. One of
6 0.85
2 these classification systems deals with
7 2.12
5 "narrative" melodies: i.e. melodies that
8 1.69
4 tell stories by rising to climaxes before
9 0.85
2 descending to denouements. Figure 5 il-
10 1.27
3
11 0.00 lustrates two themes both of which can
o
12 0.85 be approximated by a musical reading of
2
the third iteration of the Peano curve
Total 100.00
236
z/2 heading that rise and fall in this
Quadratic Gosper Curve {Turtle Heading O.O) manner. These are the subject of Bach's
Fugue in G minor for organ, BWV 542
Interval Length Number Percentage
(Fig. 5a) and "Tea for Two," composed
in Half-Steps of Occurrences of Occurrences
for the 1 92aI musical comedy No, No,
O O 0.00 Nannette (Fig. 5b). (The rise and fall of
1 56 25.34
the Bach theme can be seen in the illus-
2 94 42.53
tration. This pattern is not evident in the
3 28 12.67
4 26 excerpt from the "Tea for Two" theme,
11.76
5 7 3.17 however, as only the first few notes are
6 2.71 reproduced here.) Another classification
7 4 1.81 system deals with fundamental melodic
0.00 shapes, some of them small-scale, some
0.00 large-scale. By mixing and matching
10 0 0.00 these shapes, various kinds of melodies
11 0 0.00
can be described and classified. Both the
12 0 0.00
subject of the Bach fugue and the open-
Total 221 100.00 ing measures of "Tea for Two,"for ex-

Maso77 and Saffle, L-Systems, Melodies and Musical Structure 35

This content downloaded from 155.246.163.146 on Tue, 02 May 2017 16:13:29 UTC
All use subject to http://about.jstor.org/terms
1
ample, are sawtooth in shape. Both the one or more models of perce ption in principles in the perception of art-
work.... [Yet] the fact remains: hu-
fugue and "Tea for Two" as complete order to determine whether ^ a given
man beings cannot escape being part
works also contain sawtooth self-similari- melody or musical structure i .s ugly or
of nature. More important, neither can
ties, which we will discuss below. beautiful. Narmour's research [ into the their music [37].
There are fundamental differences as ways that melodies are perceive d has re-
The "part of nature" Narmour seems
well as similarities between the Bach sulted in the refinement of a universal
to be talking about is an invariant of per-
fugue subject and the ;'Tea for Two? "implicationXrealizations' mod el of mu-
ception, not a Platonic ideal against
tune. Fugue subjects are generally short, sical experience [36]. Accordir ng to this
which individual artworks can be some-
while popular songs like "Tea for Two" model, the opening of every fr nelody or
how measured. Nevertheless, the notion
are generally periodic in structure they motif implies an appropriate > kind of
consist of balanced pairs or sets of full
of such an invariant would seem to have
conclusion. Sometimes, of cour se, a con-
something to do with universal notions
melodic phrases. Furthermore, the "Tea clusion may be denied or sid estepped
of ugliness and beauty, algorithmic or
for Twof' melody implies a kind of har- before an initial implication is s atisfacto-
otherwise.
monic accompaniment that is out of rily resolved. Narmour has bee n able to
keeping with the melodies of Bach's era. explain convincingly how hun dreds of
All musical compositions demonstrate different melodies work in tern ns of this FAMILL^R TVNES AND
cultural or historical characteristics. This model, but he has not dealt ei ther with L^SySTEM CURVES
does not mean, however that they con- fractal properties of musical sl tructures . .
Are slmllarltles between muslc and L^sys-
sist eocclustzoely of cultural or historical ges-
or with the similarities that seer n to exlst
tem curves colnadental, then, or 1S there
tures. Only recently have scientists and between individual tunes and
L-system something about the melodies associated
aestheticians realized that plants possess curves. Some of his statements
I with these curves that is inherently beau-
algorithmic beauty, yet that beauty has of a theory of transcultural mu
h .Pht tiful? Indirect evidence suggests that
been present in the plants themselves for ception, however, suggest that
d many Western and non-Western melo-
scores of millions of years. be interested in these prope
dies are both fractal or quasi-fractal (at
Is there something universally appeal- similarities:
least in their motivic components) and
ing about music-something that tran-
Most humanists, including m ost his- beautiful to creators and listeners alike.
scends individual cultures and tastes? torical musicologists, have a dee p, abid- Consider the similarities between many
We believe the human mind may use ing distrust in the assertion of u] niversal melodies generated by L-systems and the

openings of many familiar tunes. In his

F;g. 6. Stretching the quadratic Gosper curve. (a) Levels of the first iteration of tl he curve Dtrectory of Tunes and Musical Themes,
can be stretched up to five times their original lengths to produce a host of variati ions. One Denys Parsons identiEles thousands of
level is one vertical uIiit or forward move by the turtle. Only five variations are sh own classical and popular melodies by as
here. (The numbers in parentheses indicate how much each level has been stretch led.) The many as the first 16 notes of each melody
left-hand figure matches the second theme from the second movement of Respig] hi's An- [38]. (He ignores rhythmic patterns.) We
cient Airs and Dances, Suite No. 1. The right-hand figure matches one of the theme vs fromd compared entries in Parsons's Directory
Debussyss "IberiaX (Images, No. 2). (b) Many stretched iterations of the curve cor]
with the beginnings of well-known classical melodies. Three matches are shown hz
ereP(The with melodies produced by L-system
top melody corresponds to the left-hand stretched curve, the middle melody to th e middle curves, in which vertical moves were read
stretched curve, and so on. ) in terms of intervals between notes in a
major scale. (Like Parsons, we also ig-
nored rhythmic patterns.) Some L-system
-
curves produced few or no matches with
melodies identified in Parsons's work.

,
Others, however, such as the third itera-
j:
[
v r tion of the Peano curve (X/2 rotation),
s
g Ln produced matches with two dozen com-
o
A Jl
f
l t positions, ranging from the melody of a
- .]

* I * X z 2
a J s k s s * 1 X X 4 S 1 2 3 4 X waltz by Brahms and themes from two of
] l s j 4 X

(11111) (11112) (1 1 1 14)


(11115) Richard Strauss's tone poems to popular
(11113)
tunes like Robert Allen 2 s '4Everybody
(a)
Loves a Lover" and Walter Donaldson's
"Carolina in the Morning." (L-system
-

J J curves also produce matches with rhyth-


ll
! mic patterns c,ommon to many European
and American melodies, but we cannot
J discuss those matches here.)
J Modifications in first iterations of in-
l - -
dividual L-system curves turned up more
n-J matches. (Modifying curves and their it-
erations may seem to violate the purity

4 X 2 3 4 5
of the edge-rewriting technique. Our
O 1 2 a 4 5 3 1 2 3 4 5
object, though, is to study musical appli-
(11151)
(11152) (11153)
cations and not fundamental math-
Nin Musorgsky Canteloube
(b) ematical issues.) The first iteration of

36 Mason and Saffle, L-Systems, Melodies and Musical Structure

This content downloaded from 155.246.163.146 on Tue, 02 May 2017 16:13:29 UTC
All use subject to http://about.jstor.org/terms
p$ 7 -$7/.X
i t S o;ro@,- , tjf7 ,.4
the quadratic Gosper curve, for ex- quadratic Gosper curve were less suc- the Peano curve. (This curve, with its
ample, is bounded by a 5-x-5 grid; thus, cessful in producing melodic matches. sawtooth shape, is illustrated in Fig. 1.)
it contains five levels. To generate more Rotating the Gosper curve to start at the The same shape also reappears at sev-
melodies from the same basic shape, the 311/2 turtle heading, for instance, pro- eral structural levels of both works. In
curve can be stretched. To do this, indi- duced only 30 matches with tunes iden- Fig. 7, for example, boxes drawn around
vidual segments of the basic curve can tified in the Barlow-Morgenstern dictio- several areas in a passage from the Bach
be doubled or even redoubled as they naries. It is important to remember that fugue indicate several structural levels:
pass through individual levels. For each matching curves and tunes is a matter of foreground (motifs), represented by the
of the five levels, curve segments were reading curves in terms of scales and/or smallest boxes (shaded); middle-ground
stretched up to five times their original rhythmic intervals. All of the matches (melodic statements and counter-state-
length (Fig. 6a). identified above were based on transpos- ments), represented by the larger box;
Of 3,125 variations produced by ing dictionary entries into the key of C and background (sections and modula-
means of this stretching" process, 219 major. Although rhythmic readings were tions), represented by the largest box.
matched- pitch-for-pitch familiar ignored for purposes of this study, they Within the largest box, important
tunes identified in the Dictionary of Musi- could certainly be used to generate mu- sawtooth shapes that establish keys are
cal Themes [39] and the Dictionary of Vocal sical structures of their own. (We limited circled to make their identification
Themes [40], both compiled by Harold ourselves to the Barlow-Morgenstern easier. It is clear that Bach used a variety
Barlow and Sam Morgenstern. The origi- dictionaries to identify matches with ex- of sawtooth patterns in this work, even
nal quadratic Gosper curve (without any isting melodies, and these dictionaries as he built to a climax around measure
stretching) matches the second theme of did not identify rhythmic patterns.) 95 of the fugue, then allowed the musi-
the second movement of Respighi's An- Reading the same curves in terms of cal tension to relax into the subsequent
cient Airs and Dances, Suite No. 1 (Fig. other musical patterns the "Gypsy" denouement. The replication of me-
6a). Various stretchings match themes by scale, for example, or the Dorian lodic and rhythmic patterns on various
Beethoven, Liszt, Handel, Palestrina, mode- might produce matches with levels of classical compositions is a well-
Mozart, Debussy, Copland, Hindemith, other tunes such as Gregorian melodies, documented phenomenon [41], al-
Korngold, Purcell, Rachmaninoff, a repertory ignored by Parson and though previous publications have not
Glinka, Galuppi, Billings, Verdi, Faure, Morgenstern altogether. considered possible associations with L-
Scarlatti, Virgil Thomson, and a host of system curves.
other classical figures. (The Barlow- Sawtooth patterns function somewhat
SELF SIMIL&R AND
Morgenstern dictionaries do not include differently in "Tea for Two." The Bach
popular or traditional themes.) Three MUSICAL STRUCTURES fugue is a "through-composed" struc-
stretchings and their matching melo- We have already seen that the sawtooth ture, meaning that the subject itself
dies in these cases, tunes by Nin, shape common to both the subject of a only a few measures long reappears
Musorgsky, andJoseph Canteloube are Bach fugue and the opening measures frequently throughout the work as a
illustrated in Fig. 6b. of a popular song (see Fig. 5) can be whole. "Tea for Two," on the other
Other iterations and rotations of the generated by an L-system in the form of hand, is a periodic structure, composed

H ' rl: ' ,=!;6'" =': it: r,L;r =,! = =,

Fig. 7. A few mea-


8 77;t<ifz';l-r=+$> 1 tn .- 2 JJ l $; S
sures from Bach's
Fugue in G minor,
BWV 542. Several
levels of self-simi-
larity related to the
sawtooth shape of X _ -X ;/t ;> ? e' ' ' . > t tz rt
the Fugue's subject
(illustrated in Fig. ir Wt ,F , S !*--f-|+i++/- 4 < 1 - z x 1
5a) are boxed. Har-
monically signifi-
i):W1. 1_ - ' 'v-,' J ' a1',' '- ' > I ^ F i ,' ^ @r =r,&S, ,,1. . t1
cant "sawtooth"
patterns are circled
and connected to il- a ''-ar jetwt e<=ffi_1 te, I
lustrate overall self-
similarity. (Not all
sawtooth" patterns
are marked in this
example. )
: k ' ' ' t' _ 1 - t _ 4

)&'s e4#SizSS1 ' e -S 1sX


')@ frt**>4; =S>i#ti0#< r p t r7

to:> - I - :t - f 1

Mason and Saffle, L-Systems, Melodies and Musical Structure 37

This content downloaded from 155.246.163.146 on Tue, 02 May 2017 16:13:29 UTC
All use subject to http://about.jstor.org/terms
ternational Exhibition in Tsukuba, Japan, "Perspec- objects of the NeXT music kit) on a NeXTStation.
(as mentioned above) of more or less
tives of New Music 23 No. 2, 196-215 (1985). The program Ensemble(E) with MIDI was used to re-
symmetrical phrases. The first and third alize the MII)I files into sound on a Roland key-
8. P. Prusinkiewicz and A. Lindenmayer, The Algo-
of these phrases are virtually identical to board. All results were recorded on tape.
rzthmzc Beauty of Plants (New York: Springer-Verlag,
each other, and the second resembles 1990) pp. 1-3. 25. Leonardo is now depositing information in elec-
the first and third. Only the opening tronic form on the Internet, hosted at the MIT
9. Prusinkiewicz and Lindenmayer [81 pp. 3-6. Press file server <mitpress.mit.edu>. For complete
measures of the fourth phrase are differ-
directions on accessing the site, see the announce-
10. Prusinkiewicz and Lindenmayer [8] p. 6
ent, but the closing measures of that ment at the front of this issue. The three files ac-
phrase are virtually identical with the 11. H. Abelson and A. di Sessa, Turtle Geometry companying this article are named "Masgosp,"
(Cambridge: MIT Press, 1981) p. 393. LogoX was "Mascurvl" and Mascurv2," with extensions PC,
closing measures of the tune. (Copy-
developed as an educational tool to teach children Mac and NeXT. These files can be listened to using
right permission could not be secured about computers and computer programming. In MIDI equipment.

to reprint the entire tune.) In any event, LogolE) a turtle figure on the screen will travel speci-
26. The idea of looking at the percentage of inter-
fied distances and directions (with or without the
most of the phrases that make up "Tea vals occurring in pieces of music was inspired by
pen down) when given commands by the user. We
for Two" are sawtooth in shape. K.J. Hsu and A.J. Hsu, "Fractal Geometry of
have borrowed the concept of a turtle, but not the
Music,"Proceedings of the Natzonal Acade?7ly of Science,
It seems unlikely that Bach's fugue or image. No turtle appears on our computer screen
U.S.A. 87, No. 3, 938-941 (1990) and K.J. Hsu and
when L-system curves are being drawn; instead, the
"Tea for Two" could be generated en- A.J. Hsu, "Self-Similarity of the '1/f Noise' Called
figures are drawn with discrete commands.
Music," Proceedings oftheNationalAcademy of Sczence,
tirely by L-system curves. However, both
12. Prusinkiewicz and Lindenmayer [8] pp. 6-7, 18. U.S.A. 88, No. 8, 3507-3509 (1991). Table 1 re-
works seem to contain fractal elements sembles one of Hsu and Hsu's tables, but repre-
The term "turtle heading" refers to the direction a
whose appeal may transcend their cul- that the turtle faces while drawing the curve. sents the work of the two authors.

tural or historical origins. Moreover, 27. R. Lach, Studien zurEntwicklungsgeschicAte der


13. P. Prusinkiewicz and J. Hanan, Lzndenmayer Sys-
there can be no doubt that both works tems, Fractalsa and Plants (New York: Springer- ornamentalen Melopoie (Leipzig, Germany: C. F.
Verlag, 1989) pp. 11-12. The convention for + and Kahnt, 1913).
display some of the self-similarity associ-
- is reversed in The Algarithmzc Beauty of Plants. We
ated with the world of L-systems and are using the convention in I>indenmayer Systems,
28. G. Herzog, Speech Melody and Primitive Mu-
sic," Musical Quarterly 20, No. 4, 452-470 (1934).
fractal geometry. As our work continues, Fractats, and Plants since our figures and computer
programs were written with this convention.
we hope to be able to generate composi- 29. B. Szabolcsi, A Historw of Melody (New York: St.
Martin's Press, 1965).
tions as listenable (if not necessarily as 14. Prusinkiewicz and Lindenmayer [8] pp. 3-6.

complex) as Bach's fugue. We intend to 15. P. Prusinkiewicz, Score Generation with L-


30. B. Nettl, Music in Pqznitive Culture (Cambridge,
MA: Harvard Univ. Press, 1959).
employ L-system curves to model several Systems,"International ComputerMusic Conference '86
Proceedings (1986) pp. 455-457.
kinds of musical structures using new re- 31. E. Narmour, The Analysis and Cognition of Basic
Melodic Structures (Chicago, IL and London: Univ.
cursion schemes of our own. 16. Prusinkiewicz and Lindenmayer [8] p. 12.
Of Chicago Press, 1992).
17. Prusinkiewicz and Hanan [ 13] p. 79.
32. For example, W. Fowler, "Tactics for Writing
18. P. Prusinkiewicz, K. Krithivasan and M.G. Tunes, Keyboard 15, No. 12, 94-95 (1989).
References and Notes
Vijayanarayana, "Application of L-Systems to Algo-
33. C. Adams, Melodic Contour Typology,"
1. See, for example, A. Lorenz, Der muszkalzsche rithmic Generation of South Indian Folk Art Pat-
ECtAnomusicology 20, No. 2, 179-215 ( 1976) .
AuXau des BuAnenfestspieZes "Derffing des Nibelungen" terns and Karnatic Music," in R. Narasimhan, ed., A
(Berlin: Max Hesse, 1924), and other volumes in Perspectzve zn Theoretical Computer Sczence, Series in 34. See "melody" in The New Har7vard Dictionary of
the series "Das Geheimnis der Form bei Richard Computer Science 16 (1988) pp. 229-248. This ar-
Muszc (Cambridge, MA: Belknap Press, 1986) pp.
Wagner." Many experts have disagreed with ticle does not refer to L-system curves, but only to 481-484.
Lorenz's findings involving large-scale structures, L-system strings.

however. See Ulrich Muller and Peter Wapnewski, 35. A. Ringer, "melody," in Stanley Sadie, ed., The
19. B. Mandelbrot, TheFractal Geometry of Nature
eds., The Wagner Handhook, John Deathridge, trans. New Grove Dictionary of Music and Musicians (New
(New York: W.H. Freemane 1983) p. 44. York: Macmillan, 1980) Vol. 12, pp. 118-127.
(Cambridge, MA and London: Harvard Univ. Press,
1992) pp. 21X215. 20. Prusinkiewicz and Lindenmayer [8] p. 9. In this 36. Narmour, The Analysis and Cognitzon of Musical
work, the curve is identified as "a quadratic modifi-
2. Among other works, see H. Schenker, Harmony Complexity (Chicago, IL and New York: Univ. of Chi-
cation of the snowflake curve. cago Press, 1992).
(Chicago, IL: Univ. of Chicago Press, 1972).

21. Mandelbrot [19] p. 446. 37. Narmour [31] p. 66.


3. L. Meyer and G. Cooper, The Whythmzc Structure of
Music (Chicago: Univ. of Chicago Press, 1960). 22. Prusinkiewicz and Lindenmayer [8] pp. 11-18. 38. D. Parsons, The Directory of Tunes and Musical
4. F. Lerdahl and R. Jackendoff, A Generatzve Theory The?7les (Cambridge, MA: Spencer Brown, 1975).
23. Prusinkiewicz and Lindenmayer [81 pp 11-13.
of Tonal Music (Cambridge, MA and London: MIT
These pages give the exact requirements that 39. H. Barlow and S. Morgenstern, A Dictionarw of
Press, 1983).
curves must meet in order to be FASS curves Musical Themes (New York: Crown, 1948).
(which are bounded and do not intersect them-
5. K. Jones, Compositional Applications of Sto-
selves). We dropped certain requirements and 40. Barlow and Morgenstern, A Dictionary of Vocal
chastic Processes," Computer Music Joureal 5, No. 2, Themes (New York: Crown, 1950). Other editions of
adapted the rules slightly to allow the curve to in-
45-61 (Summer 1981 ) .
tersect itself.
dictionaries by Barlow and Morgenstern have also
appeared in print. All Barlow-Morgenstern editions
6. C. Arnes, "'Crystals': Recursive Structures in Au-
24. The string-rewriting procedures were written contain indexing errors, however, and they should
tomated Composition," Computer Mustc Journal 6,
with the software package Mathematica@. The com- be consulted with caution.
No. 3, 4S64 (1982).
puter programs that interpreted the L-systems as
41. See, for example, P. Breslauer, "Diminutional
7. L. Hiller and C. Ames with R. Franki, Auto- curves and converted the curves into MIDI files
Rhythm and Melodic Structure,"Journal of Music
mated Composition: An Installation at the 1985 In- were written in NeXT objective C (including the
Theory 32, No. 1, 1-19 (1988).

38 Masorl and SaffZe} L-Systemss Melodies and Musical Structure

This content downloaded from 155.246.163.146 on Tue, 02 May 2017 16:13:29 UTC
All use subject to http://about.jstor.org/terms

You might also like