You are on page 1of 14

Leonardo

The Markov Process as a Compositional Model: A Survey and Tutorial


Author(s): Charles Ames
Source: Leonardo, Vol. 22, No. 2 (1989), pp. 175-187
Published by: The MIT Press
Stable URL: http://www.jstor.org/stable/1575226 .
Accessed: 18/12/2014 21:12

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

.
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.

The MIT Press and Leonardo are collaborating with JSTOR to digitize, preserve and extend access to
Leonardo.

http://www.jstor.org

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
ABSTRACT

The Markov Process as a


Theauthor combines a survey
ofMarkov-based effortsinauto-
Compositional Model: matedcomposition witha tutorial
howvarious
demonstrating theo-
reticalproperties associated with
A Survey and Tutorial Markov processescanbeputto
practical use.Thehistorical back-
ground is tracedfromA.A.
Markov's formulation
original
CharlesAmes through tothepresent. Adigres-
sionintoMarkov-chain theory intro-
duces'waiting counts'and'station-
Theauthor's
aryprobabilities'.
Demonstration 4 forsoloclarinet
illustrateshowtheseproperties
affectthebehavior ofa melody
composed usingMarkov chains.
I n my previous Leonardo article, "Automated well Markovprocesses compare Thissimpleexample becomesa
Composition in Retrospect: 1956-1986", I described a va- to alternative methods in at- pointofdeparture forincreasingly
riety of approaches that have been used over the past 30 general ofthe
interpretations
taining these objectives. Markov process.Theinterpretation
years to generate musical compositions using computer of'states'is reevaluatedinthelight
programs [1]. One approach I mentioned only in passing ofrecentmusical effortsthatem-
was the Markov process, which I judged at the time to be SOME ployMarkov chainsofhigher-level
only of peripheral interest to users of composing programs. DEFINITIONS objectsandinthelightofother
Since then, several developments have shown me that the effortsthatincorporate relative
i,, c ;,in, tho
.r;ihi ,;l,nr;,,,
nc,i,
enthusiasm toward Markov processes is much greater than A Markov chain models the be- aLrIouuteiiiu .ii PuSSIlulcIlltl-
pretations.
Other
effortsexpand
I had estimated. Undoubtedly the strongest indication of havior of a sequence of events, Markov's definition
to em-
original
misjudgement on my part has been the phenomenal re- each of which can assume any brace'Nth-order' evolv-
transitions,
sponse to M and Jam Factoryover the past 2 years-the first one of a fixed range of states. ingtransition
matrices
andchains
time any effort at automated composition has met with the Changes in state between con- ofchains.Theremainder
article
ofthis
slightest commercial success-but these important pro- secutive events commonly are
secutive
events . contrasts
. Markovprocesses
common.ly withalternative
compositional
grams are only part of a general resurgence of interest in referred to as transitions. It is strategies.
Markovchains over the past decade. Several new approaches convenient to designate the
toward Markov chains have come to my attention since I state of the chain prior to a
wrote my retrospective, and I even found myself personally transition as the transition's
involved with them in 1986 when John Myhill hired me to source(equivalently, the chain's
implement some Markov processes that could gradually currentstate)and to designate the outcome as the transition's
evolve over the course of a musical work he was composing destination(the chain's future state). Consecutive transitions
[2]. link up so that the destination for one transition serves as
I choose to integrate the present survey of musical appli- the source for the next transition. The range of a Markov
cations with a tutorial because there are some significant chain is, appropriately, the collection of all possible states.
theoretical ramifications associated with Markov chains. As For musical applications, we can assume that this collection
with all mathematical formalisms, the intrinsic logic behind will alwaysbe finite.
Markov processes remains valid no matter what real-world In Markov'smodel, the behavior of a chain is distilled into
meaning the symbols (in this case the 'states' of the chain) a set of numbers called transitionprobabilities.
Each transition
might have. Indeed, the matrix representation devised by probability indicates the relative likelihood that the chain
mathematicians to describe how Markov chains behave will jump to a particular destination, assuming that it cur-
lends a deceptive simplicity; Markovprocesses can be shown rently resides at a particular source. Mathematicians conven-
to include many seemingly more complex methodologies as tionally organize these numbers into a transitionmatrix(or,
special cases. Although the mathematics is too formidable more formally, a matrixof transitionprobabilities).All transi-
to elaborate in a tutorial of this nature, a few examples will tion matrices have the form depicted in Matrix 1.
suffice to demonstrate how one can deduce the behavior of
a chain from its matrix [3]. The meanings associated with
each state of the chain depend, of course, on the applica- BACKGROUND
tion, and for examples of how Markovchains can be applied Markov chains were formulated in 1906 by the mathemati-
to music it will generally be best to go directly to the sources. cian Andrei Andreevich Markov (1856-1922), who first used
A constructive evaluation of a compositional procedure his model to distill tendencies of spelling in written Russian
ultimately must take into account the music produced; from the text of Aleksandr Pushkin's Eugene Onegin. The
however, different procedures have their different strengths dependency of consecutive letters in literary texts should be
and weaknesses. A composer can estimate the appropriate- clear from such basic rules of English spelling as 'always
ness of such a procedure by considering his or her musical
objectives and by determining how effective the procedure Charles Ames (composer), 68 Stevenson Boulevard, Eggertsville, NY 14226, U.S.A.
is at realizing these objectives. The last section of this article
Received 24 May 1988.
enumerates a number of objectives that have been recurrent
This article is dedicated to the memory of John Myhill.
among users of composing programs, and it discusses how

? 1989 SAST
Pergamon Press pic. Printedin Great Britain.
0024-094X/89 $3.00+0.00 LEONARDO, Vol. 22, No. 2, pp. 175-187, 1989 175

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
non's ideas [9]. Attempts by Meyer and
Matrix1. Generalformof an n-statematrix.Thetransition Pij givesthe
probability
ofjumpingfromstatei to statej.
relativelikelihood others to apply Information Theory to
music have been much less rigorous
source destination than Shannon's original formulation.
These attempts typically put the listen-
state 1 state 2 state 3 state n er's faculties for perceiving musical re-
state 1 Pil, P1,2 P1,3 P1,n lationships into the role of the 'noisy
state 2 P2,1 P2,2 P2,3 P2,n channel'. They then draw inferences
concerning how much redundancy
state n Pn,1 Pn,2 Pn,3 Pn,n may be removed from a musical mes-
sage before the message begins to lose
intelligibility.
Markov processes have also been
follow Qwith U and 'Ibefore E except redundancy increases. It should be used directly in composing programs
after C'. Markov calculated his transi- pointed out that Shannon's formula that have employed both 'composed'
tion probabilities by tallying pairs of often clashes with our intuitive sense of transition probabilities and probabili-
consecutive letters (if Pushkin had writ- musical meaning, since he considers an ties obtained through analysis of musi-
ten in English, Markovwould have had unpredictable message as formally cal source material. Experiment 4 of
to compile 26 x 26 = 676 tallies); he equivalent to a random message. Lejaren Hiller and Leonard Isaacson's
then divided these tallies into groups (Henceforth, I will enclose the terms 1957 Illiac Suitestands as the first direct
based on first letters (e.g. one group of 'information content' and 'redun- use of Markov chains to compose mu-
tallies for pairs of letters beginning with dancy' in single quotes when Shan- sic. The Illiac computer selected con-
A, one for pairs beginning with B, etc.; non's interpretation applies.) secutive intervals for each instrument
each one of these groups fills up one Shannon models messages as Mar- according to the criteria of harmony
row in the transition matrix); finally, he kov chains, with one state for each (greatest weight to most consonant in-
'normalized' his transition proba- different symbol in the message. Conse- tervals), proximity (greatest weight to
bilities by dividing each individual tally quently, when the 'information con- smallest intervals) and combinations of
by the total of the tallies in the same tent' is high, the transition probabilities the two [10]. The five "Strophe"move-
group. As is evident from Markov'sorig- will all be close to 1/n, n being the size ments of Hiller and Baker's 1963 Com-
inal subject matter, his model is statisti- of Shannon's 'alphabet'. Conversely, puter Cantata derive transition proba-
calin nature-the processes it describes when 'redundancy' is high, transitions bilities from the "Putnum's Camp"
need not necessarily be random. How- will be strongly biased toward certain movement of Charles Ives's ThreePlaces
ever, the fact that one would resort to patterns of succession. Using this in NewEnglandand impose these proba-
such a model suggests that the underly- model, Shannon proceeds to analyze bilities upon each of the following mu-
ing causes and effects are not well un- mathematically how transmitting such sical attributes: pitches, durations, dy-
derstood. At best, the model provides a message through a 'noisy channel' namics, notes versus rests, and playing
only partial descriptions of nonrandom (such as a telegraph wire) results in loss styles. In describing their work, Hiller
behavior. of information and what safeguards can and Baker cite Shannon's notion of
Markovchains are a primary topic of be imposed to minimize this loss. 'information content', which Hiller
study in the mathematical discipline of Musical analysts during the late and Baker attempt to treat as a large-
stochastic processes, where they have 1940s and 1950s recognized both Mar- scale musical attribute analogous to
been used to model random processes, kov matrices and Information Theory tempo, key, thickness of texture, and so
such as the changing fortunes of a gam- as potential tools for distilling the on [11].
bler, the inventory of a commodity as it norms and deviations of musical styles. In 1959, Iannis Xenakis wrote three
is affected by continuing pressures Much initial interest in applying Infor- works in which he used Markov chains
from supply and demand, or genetic mation Theory to music was sparked by to control successions of large-scale
fluctuations under random matings Harry Olson's Markov analyses of the events: AnalogiqueA for string orches-
and mutations. Markovchains have also songs of Stephen Foster [5] and by tra, AnalogiqueB for sinusoidal sounds,
played an important role in connection Richard Pinkerton's ScientificAmerican and Syrmosfor 18 strings. Xenakis's ap-
with Claude Shannon's Information article [6]. Allen McHose compiled ex- proach differs strongly from that of
Theory. tensive statistics on contrapuntal prac- Hiller and his collaborators in that Xe-
Since Information Theory was fre- tices in Bach's chorale harmonizations nakis's processes emulate the behavior
quently cited but inadequately ex- and used these statistics to deduce 'cor- of many simultaneous Markov chains.
plained in the music-theoretic writings rect' and 'incorrect' practices [7]. In The states of Xenakis's process are con-
of the 1950s and 1960s, it is worthwhile Emotionand Meaningin Music,Leonard structs, which Xenakis calls 'screens'.
to provide a brief outline here. Shan- Meyer, who was also an early proponent Each screen constitutes a configuration
non's 1948 article, "The Mathematical of Markov-styleanalysis,cites the "Table of one or more regions of 'musical
Theory of Communication", proposes of Usual Root Progressions" from Wal- space' [12], in which some number of
a formula for measuring the 'informa- ter Piston's Harmony (first published elementary 'grains' of sound may
tion content' of a 'message'-that is, of 1941) as "nothing more than a state- occur.
a sequence of discrete symbols such as ment of the system of [conditional] Although they have gained little en-
a literary text [4]. According to these probability which we know as tonal har- thusiasm from composers who do not
formulas, the least predictable mes- mony" [8]. Meyer's later "Meaning in rely on automated decision-making,
sages have the greatest information Music and Information Theory" corre- Markovchains have been employed re-
content, i.e. information decreases as lates this attitude directly with Shan- currently in composing programs over

176 Ames,The Markov Process as a Compositional Model: A Survey and Tutorial

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
[13] and with Petr Kotik's interactive the transition matrix are called the wait-
Matrix2. Athree-statetransition transition-matrix editor [14]. The "sys- ing probabilities(or fixed-stateprobabili-
matrix. tems approach to composition" devised ties),and they give the probabilities that
by Curtis Roads [15] can be shown to consecutive events in a chain will oc-
source destination
be based on Markovian principles-al- cupy the same state. Another way of
though this is not readily apparent- looking at this is to consider the waiting
A B C and the 'harmonic algorithm' de- count, that is, the number of times a
A 0.5 0.4 0.1 scribed by Laurie Spiegel [16] is single state occurs consecutively. When
B 0.4 0.5 0.1 actually a Markov process reminiscent the waiting probability is P, then the
C 0.4 0.4 0.2 of Piston's '"Tableof Usual Root Pro- average (or 'expected') waiting count
gressions". Intentional use of Markov Wis given by the formula:
processes has been made by R. C. Zar- 1
Table1. This'systemof equations' pov [17], Tracy Lind Peterson [18], W=
1-P
estimatestheoveralldistribution KevinJones [19], Thomas DeLio [20],
of statesthatwilloccurwheneach Sever Tipei, John Myhill, the group of When the waiting probabilities ap-
of manysimultaneous chainsun- Claudio Baffioni, Francesco Guerra
dertakesone of thetransitions proach zero, the rate of change grows,
and Laura Tedeschini Lalli [21], and and the waiting counts fall to a lower
describedby Matrix2.
Darrell Conklin [22]. Capabilities for limit of one state (reflecting the origi-
K' (A)= .5 x K(A) + .4x K(B) + .4x K(C) implementing Markov processes are nal arrival at a state). W grows to in-
K' (B)= .4 x K(A)+ .5 x K(B) + .4x K(C) among the features of the Hierarchical finity as P approaches unity, with the
K' (C)= .1 x K(A)+ .1 x K(B)+ .2 x K(C) Music SpecificationLanguage (HMSL) result that a chain evolves very slowly
environment for automated composi- when its waiting probabilities are large.
tion, which is being developed by Phil The greatest strength of Markov
Table 2. Given300 simultaneous Burk, LarryPolansky and David Rosen- chains is their capability for predicting
chains, initiallydividedequally be- boom [23]. Markovprocesses also have the immediate future based upon what
tween states A, B and C, repeated a close connection with the neural net has happened in the recent past. In an
applicationsof the system of equa- modeling of music currently being un- artistic endeavor such as music-which
tions shown in Table 1 willquickly dertaken by researchers such as Jam- depends heavily upon time as an organ-
result in an equilibriumstressing shed Bharucha [24], who has pointed izational reference-prediction of ex-
states A and B over state C.
out that the output from a neural net pectation (in the psychological sense)
States analysis is a transition matrix. is clearly a fundamental dynamic of ex-
By far the most ambitious use of Mar- perience. However, expectation is by
Transitions A B C kov chains in a composing program has no means the only factor upon which
0 100 100 100 been in two programs released in 1987 listeners base aesthetic judgments;
1 130 130 40 as commercial products: M by David another important basis forjudgement
2 133 133 34 Zicarelli, Joel Chadabe, John Offen- is the balance between compositional
hartz and Antony Widoff, and Jam Fac- elements. If these compositional ele-
3 133 133 34
toryby Zicarelli [25]. Both M and Jam ments operate as states of a Markov
4 133 133 34
Factoryare real-time compositional pro- chain, then it becomes possible to cal-
5 133 133 34 cessors, exploiting the fact that Markov culate a set of numbers called stationary
chains lend themselves well to efficient probabilities.This set of numbers sum-
implementation as computer pro- marizes the relative balances between
Table3. Whenall300 chainsare grams. Both programs have the capa- elements (or states) over the long term.
concentrated
initially instateA, bility to derive transition probabilities One can appreciate both the nature
derivedinTable2
the equilibrium from user-supplied musical excerpts. of stationary probabilities and the pro-
rapidlyassertsitselfhereas well. cedure for calculating them by consid-
ering a simple case study: Imagine 300
States
WAITING COUNTS AND Markov chains all running simultane-
STATIONARY ously in lockstep. Suppose that all 300
Transitions A B C chains share the transition probabilities
0 300 0 0 PROBABILITI'ES enumerated in Matrix 2. We want to
1 150 120 30 Two critical factors contributing to the estimate the overall distribution of
states.
2 135 132 33 long-term behavior of a Markov chain
are the average waiting counts, which Assume for the moment that 100
3 134 133 33
directly affect the rate of activity in the chains reside at the outset in state A,
4 133 133 34
chain, and the stationaryprobabilities, 100 begin in state B and 100 begin in
5 133 133 34
which predict long-term balances be- state C. Consider the first synchronized
tween the various states. These two transition. Of the 100 chains originally
in state A, the matrix tells us
properties should be taken into ac- residing
the past three decades. Ironically, some count whenever one tries to deduce the that approximately 50 will remain in
elegant instances where Markov chains behavior of a chain from its transition state A, 40 will jump to state B and 10
have been incorporated have been un- matrix. willjump to state C. Similarly, 40 of the
intentional. Such is the case with the The transition probabilities along 100 original B's would become A's, 50
INTERVAL feature of Gottfried Mi- to
the top-left bottom-right diagonal of would remain B's and 10 would become
chael Koenig's PROJECT2 program

Ames,The Markov Process as a Compositional Model: A Survey and Tutorial 177

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
Matrix3. Durational
transitions
for Matrix5. Registral inDemonstration
transitions 4.
Demonstration4.
source destination
source destination F#4-F5
E3-Eb4 A3-Ab4 C#4-C5 Bb4-A5 D5-C#6 G5-F#6
2 3 5 9 E3-Eb4 0.66 0.17 0.08 0.05 0.03 0.01
2 0.875 0.042 0.042 0.041 A3-Ab4 0.11 0.66 0.11 0.06 0.03 0.02 0.01
3 0.062 0.813 0.062 0.062 C#4-C5 0.05 0.10 0.66 0.10 0.05 0.03 0.01
5 0.104 0.104 0.688 0.104 F#4-F5 0.03 0.05 0.09 0.66 0.09 0.05 0.03
9 0.187 0.188 0.187 0.438 Bb4-A5 0.01 0.03 0.05 0.10 0.66 0.10 0.05
D5-C#6 0.01 0.02 0.03 0.06 0.11 0.66 0.11
G5-F#6 0.01 0.03 0.05 0.08 0.17 0.66
Matrix4. Transitions ar-
controlling
inDemonstration
ticulations 4.

source destination
10% 17% 29% 50%
10% 0.91 0.02 0.02 0.05
L
E3-Ep4
I A3-A64 FP4-F5 B,4-A5
I G5-FP6
I
CP4-C5 D5-CO6

17% 0.02 0.91 0.05 0.02


Fig. 3. Stationary probabilities for registers (from Matrix 5). The stationary probabilities
29% 0.05 0.02 0.91 0.02 are nonuniform even though the waiting probabilities are equal. The central concentration
50% 0.02 0.05 0.02 0.91 indicates that the transition probabilities act on the whole to direct the music toward the
middle registers.

It is a mathematical fact that no mat- choose an average duration, expressed


ter how it starts out, the system ulti- in sixteenths, and an articulation, ex-
n | l mately will settle down to an equilib- pressed as a rest/play probability. This
2 3 5 9 rium determined by the stationary rest/play probability is then used in a
,.~..-- probabilities: 44% A's, 44% B's and random branch to determine whether
1.
FiFg. Stationary probabilities dura-
for
tioIns(fromMatrix3). The varyingwidths 12% C's. In general, the stationary a note or a rest is to be composed next.
of the probabilitybarsreflectthe fact that probabilities can be derived from any If the program decides to compose a
th<e statesaffect theirowntenures. transition matrix by setting up an ap- note, then it chooses a note duration
propriate system of equations and by randomly around the average duration
applying it iterativelyuntil the numbers [27] and uses transition matrices to se-
settle into equilibrium. Although the lect a degree and a register. If it decides
procedure is tedious to undertake by to compose a rest, then it chooses a rest
.10 .17 .29 .50 hand, it is straightforward to imple- duration randomly around half the
,
l;.g' 9._.:. ,<,q : , c,at.r,, arucuia-
ment on a computer. average duration.
rig. z. oLauonaiuy pruuoaDulues Ior
tions (from Matrix 4). The stationary prob-
abilities are uniform, since the flow Average Duration
between states is symmetric and the wait- COMPOSITION WITH There are four average durations avail-
ing probabilities are equal. MARKOV CHAINS: A able to any note. Expressed in six-
teenths, these durations are 2, 3, 5 and
C's, while 40 of the 100 original C's TUTORIAL EXAMPLE 9 for notes (1, 1.5, 2.5 and 4.5 for rests).
would become A's, 40 would become Transitions are guided by the probabili-
My composition Demonstration4 illus-
B's and 20 would become C's. The net trates some of the elementary consider- ties shown in Matrix 3. One should in-
result of the first transition therefore ations involved in using Markov chains terpret Matrix 3 by noticing that transi-
would be to transform 100 A's, 100 B's to compose a piece of music. The piece tions to destinations other than the
and 100 C's into approximately 130 A's, is one of a series of 11 didactic studies I source are uniformly likely, and that
130 B's and 40 C's. the waiting probabilities go down as the
composed in 1983 and 1984 to demon-
For an arbitrary transition, if K(A), strate techniques of musical composi- durations go up. This happens by de-
K(B) and K(C) represent the number tion by computer [26]. sign. Indeed, by multiplying the aver-
of chains residing in states A, B and C The composing program consists of age note durations by their average
prior to the transition, while K'(A), one short loop: each iteration of this waiting counts, one sees that the period
K'(B) and K'(C) represent these num- loop generates either a note or a rest,
of time over which any average dura-
bers after the transition, then K'(A), and the iterations continue until the tion holds sway will be approximately
K'(B) and K'(C) may be estimated by end of the page has been reached (60 two measures:
the system of equations listed in Table measures of 2/4 time). There is no 2 3
1. Table 2 shows what happens when =16, =16,
beginning or end and very little 'shap- 1 - 0.875 1 - 0.813
these equations are applied iteratively
ing' of the music; what results is a snap-
to an original population of 100 A's, shot of a process that could go on indef- 5 9
=16, =16.
100 B's and 100 C's, while Table 3 shows 1 - 0.688 1 - 0.436
initely. At the beginning of an iteration,
what happens when the process starts the program uses transition matrices to Bear in mind that the value 16 is an
with 300 A's.

178 Ames, The Markov Process as a Compositional Model: A Survey and Tutorial

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
.

A
expectation and that it does not reflect a
r we
the shorter average durations for rests. - t-a- t- #- ^aa#-
t-t ? '^>a a- a# mi' s-'a , t-
#-
The actual periods of time will deviate 6/46 5/46 4/46 2/46 6/46 6/46 2/46 4/46 5/46 6/46

widely, since the actual (rather than A


tf
expected) waiting count and the note 'u
_m

durations both result from random 5/26 2/26 1/26 2/26 2/26 1/26 3/26 4/26 6/26
processes. Since every state has equal
a
access to every other, the relative em- sa --
t, , 'a
phasis placed on each given state is 4/23 1/23 2/23 2/23 1/23 4/23 4/23 5/23
entirely due to the state's waiting proba-
bility (see Fig. 1). 2/ .a
2/19 2/19 4/19 3/19 4/19
Articulation 2/19 2/19

Articulation is controlled through a


percentage indicating the probability 6118 #Is- I/1
that an iteration of the composing loop 6/18 6/18 2/18
2/18 1/18 1/18 2/18
will produce a rest instead of a note. iL_
- - -
HtL-
Transitions are guided by Matrix 4. No- o~ fo -
Pa - - -
u
tice that all four waiting probabilities in 6/36 2/36 2/36 2/36 6/36 6/36 2/36 2/36 2/36 6/36
Matrix 4 are 0.91. This means that any
A
of the four articulations will hold sway 6
si-
a -01# a 'k a
for an average of 11.11 notes and rests
2/18 1/18 1/18 2/18 6/18 6/18
before the next change occurs. The
transition probabilities off the diagonal Is-
219 219
are somewhat more interesting; they
favor the following cycle: 4/19 3/19 4/19 2/19 2/19 2/19 2/19
10% -- 50% -- 17% -- 29% -> 10%.
Figure 2 shows that the stationary prob- 5/23 4/
abilities are uniform. 5/23 4/23 4/23 1/23 2/23 2/23 1/23 4/23

Register Isa

My program treats registers as one-oc- ^ 6/26


As-
4/26 3/26 1/26 2/26 2/26 1/26
2/26
5/26
tave regions within which it places a -dPl
chromatic degree. There are seven reg- II- X AP Vw
ai-
s
,
v gL? -

-- -a . . . , a -
isters: E3-E 64, A3-Ab4, C#4-C5, F#4- k - . - - - - -

646 5/46
F5, Bb4-A5, D5-C#6 and G5-F#6. 6/46 4/46 2/46 6/46 6/46 2/46 4/46 5/46 6/46

Transition probabilities are shown in


Matrix 5. Since all seven waiting prob- Fig. 4. (Matrix 6) Chromatic matrix for Demonstration4. Each entry gives the probability as-
sociated with a pair of two rising chromatic intervals-with middle degrees fixed arbitrari-
abilities for Matrix 5 are 0.66, the wait- ly at B. Any triad containing chromatic identities receives a weight of 0, as do major triads,
ing count for registers will be 3. Non- minor triads, augmented triads and triads with two perfect consonances (e.g. C-F-Bb ) in
waiting transitions favor jumps to any inversion or voicing. The remaining triads receive relative weights from 1 to 6, depend-
nearby registers. The stationary proba- ing on dissonance; the denominator of each fraction is a 'normalizing' value used to con-
vert these weights into transition probabilities.
bilities are graphed in Fig. 3.

Chromatic Degrees
The sequence of chromatic degrees is a
first-order Markov chain of displace-
ments through the chromatic scale, me -
n~~F7r7r
I .-?--
M2 .
._
ma
I .n
M3a
I
r
I I ---
TT
r

--
r r
iF
mb M
-
Mb
7H
I

mIr
--

which 'wrap-around' at the octave. The


chromatic matrix shown in Matrix 6 Fig. 5. Stationary probabilities for chromatic intervals generated by Matrix 6. Intervals are
(see Fig. 4) details the transition prob- indicated in diatonic scale steps, with the qualifications m (minor), M (major), and P (per-
abilities associated with each pair of fect). TT stands for 'tritone' (an augmented fourth or diminished fifth). The emphasis
consecutive displacements. To the ex- upon dissonant intervals, especially the minor second, tritone and major seventh, reflects
the emphasis upon dissonant triads in Matrix 6.
tent that it actively excludes 'un-
desirable' sonorities, Matrix 6 reflects
the INTERVALpitch-selection feature dissonant intervals such as seconds, tri- frequently, while registers change fairly
of Koenig's PROJECT2composing pro- tones and sevenths. often.
gram; however, the graduated transi- Figure 7 presents the final result.
tion probabilities in Matrix 6 also pro- Results Floating-point durations are approxi-
mote 'desirable' sonorities, with the Figure 6 graphs average durations, ar- mated by rounding to the nearest six-
objective of encouraging a consistently ticulations and registers. Notice that ar- teenth note and by accumulating the
dissonant style. These biases are re- ticulations change the least rapidly due residue into the next note or rest. When
flected by the fact that the stationary to their high waiting probabilities. Aver- the duration of a rest rounds down to
probabilities graphed in Fig. 5 favor age durations change somewhat more zero, it appears as a break in the slur.

Ames, The Markov Process as a C ompositional Model: A Survey and Tutorial 179

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
I

AVERAGE
DURATION ^
a NNNE EW

U.DU -

0.29
ARTICULATION
0.17 . m . J I _I
!ir
07,~~~~~~~~~~~~~~~~~~~~~~~~~~~~ r
0.10 I l p-

G6

REGISTER

measure I I j I 15 1 I I 10 l I I I 115 I I 1 1 120 I

AVERAGE IF~ I 1l I i I-
DURATION
_ r L-UTi I__ I
0.50

0.29
ARTICULATION
0. 17

0.10 -

G6

REGISTER I

measure I i I | 125 1 | I | 130 1 | 1 | 135 1 | 1 140

AVERAGE
DURATION
3
2 I
I I
-I1 I --I
I

0.50

0.29
ARTICULATION
0.17
0.10

G6

REGISTER

E3~

measure I I I I 145 I I 50 1 1 55 | I| I | 60

Fig. 6. Graph of average durations, articulations and registers in Demonstration4, as guided by Matrices 3-5. Rates of activity in each
graph are determined by waiting probabilities; the relatively fluid motions in the register graph are due to the fact that Matrix 5 favors
transitions between 'nearby' states, while Matrices 3 and 4 encourage abrupt contrasts.

180 Ames, The Markov Process as a Compositional Model: A Survey and Tutorial

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
WHAT IS A STATE? Clarinet
4
Demonstration CharlesAMES
STRICTLYJ = 80
Formally the states assumed by a Mar-
kov chain can be anything at all, as long A ^eo, \ ^ - - _. b v !-
as the range of states is discrete [28]. In
practice, however, the nature of the
events that constitute the chain deter-
mines the range of states. In music,
these events might be notes or higher-
r
level objects, such as chords or phrases; ~E~Pr7 I?
in each case, the state of a chain would
be a way of describing one of these
16
events. More subtle interpretations are L a_<
also useful: in this section, I will discuss III--
--L

nJ -7lL
F7
II ^ bIl II /r-r it~~~~~~~~~~~~~~
1t?w:
I'

how states can be relative positions in


finite sequences; in later sections, I will
illustrate how states can be sequences ti^
"
^C^iJL^ ^^
of states or lower-order Markov chains
in their own right.
0e~Q1tr tot'e t?
When the events are simple notes,
the most common practice has been to
let the states be either a simple 'scalar' ;W<#S' t l"/JJIr7 r
attribute (e.g. duration alone or pitch
alone) or a 'vector' describing two or
more attributes simultaneously (e.g. Sw* 1PT^
41~~~~~~
f
?~~~~~~~l^'
ft 3e t

duration, pitch, dynamic and articula-


tion as components of a note). A more I~~t~ _ ~??
fi

subtle approach is to model modesof

i^nj^n,- -
behavior by using different states to
represent alternative inflections of one- te2S -%ft
a. j."^^. I -

and-the-same attribute. For example, A I


Kotik has represented the one-and-the-
same scale degree in ascending and SL- ijS--C 4, I
i^t
descending versions: the transition
probabilities for different versions i v_
w.
; 1. ^
1
,-?n-, J a
I
I
favor motion in the indicated direction I _ _ J

but also incorporate a background like- 0~~'~r~...,


- ~_ .' -
lihood of switching direction.
A common complaint against some
^- ?T' _. sjIi- 11
early musical applications of Markov ( Charles Ames 1984
chains has been their limited vertical
Fig. 7. A composition generated by transition Matrices 3-6. This is a 'snapshot' of a
sensitivity.This was especially evident in process that could go on indefinitely. Whatever long-term shapes are present in this music
the Illiac Suiteand the ComputerCantata, are due entirely to the slower-moving processes graphed in Fig. 6.
in which the various instrumental parts
were left to go along their independent
ways with no 'awareness' of what the
other parts were doing. However, many
other efforts have remedied this defect
by employing higher-level states. As dis-
cussed by Xenakis [29], a state can be a
'screen' describing all of the musical
activity at a particular instant of time
during the composition. States can be
Fig. 8. An event-relationdiagramrepresenting a procedural network for generating finite se-
chords, as in M and Jam Factory,or they
quences using the tokens a through m. This diagram is formally equivalent to Matrix 7.
can be polyphonic phrases, as discussed
byJones [30].
It is sometimes advantageous if the
states are ordinal positionswithin a se- ject appearing at different moments in to interpret the various matrix entries
quence. Consider the event-relationdia- time. Figure 8 is equivalent to Matrix 7. as follows:
gram [31] shown in Fig. 8, where the Matrix 7 is filled mostly with zeros 1. Entries on the top-left to bottom-
tokens a through m symbolize ordinal (omitted); to an information theorist it right diagonal indicate waiting prob-
elements. These elements might be would have high 'redundancy' and low abilities (elements d and k; all others
notes, chords or phrases; the main 'information content'. The fact that the are zero).
point is that different elements may process has a terminal state m allows us 2. Entries immediately to the right of
possibly represent the same musical ob- the waiting-probabilities diagonal

Ames, The Markov Process as a Compositional Model: A Survey and Tutorial 181

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
STROPHE I (zeroth order)
i.- 2g
E
I
F1.
;A
gb.- II 1,b
- -- I --P
,p
f "1
mpp ,LrL=
fp
iff

STROPHE II (first order)

-
F'
~t- r i _ AF \ r
7
mp mf,;mpJ PP fn f p ff pp f p f p f mppp p nffff '

STROPHE III (second order)

tt |ziI J
ff if-:t7 / rn

Fig. 9. Opening flute passages from Strophes I-III of Hiller and Baker's ComputerCantata,showing the differences in musical material
obtained through zeroth-, first- and second-order analysis of music by Ives. Copyright ? 1963 New Music Edition. Used by permission of
the publisher, Theodore Presser Company, Bryn Mawr, PA 19010, U.S.A.

indicate, for the most part, the prob- Matrix7. Theevent-relation


diagramshowninFig.8 is equivalent
to thistransition
abilities for advancing 'normally' matrix.
through the sequence (transitions
c -- d, e-> f, j - k, etc.). source destination
3. Other entries to the right of the di-
a b c d e f g h i j k I m
agonal give probabilities for skip-
ping ahead (transitions e -> g and a 1.00
h - j, etc.) or for branching to alter- b 0.50 0.50
native sequences (transitions b -> c c 1.00
and b -> e). d 0.25 0.75
4. Entries to the left of the diagonal give e 0.75 0.25
probabilities for looping back (tran- f 1.00
sitions 1 - h and -> b).
5. Since element m is a terminal state, g 1.00
the transition probabilities in the h 0.60 0.40
bottom are meaningless; the waiting i 1.00
probability has been set to unity 1.00
simply for form's sake. k 0.33 0.67
0.50 0.25 0.25
m 1.00
NTH-ORDER CHAINS
The discrimination of Markov model-
ing can be greatly enhanced by making that every Nth order process has an of various orders in their 1963 Computer
transition probabilities sensitive to two
or more previous states. The orderof a equivalent first-order formulation, Cantata [32], intending that these
which can be obtained by treating se- changing orders would be perceivable
Markov chain indicates the number of
quences of states as states in their own as large-scale changes in 'information
past states taken into consideration:
events in a 'zeroth-order' chain are right. In addition, we have already seen context'. Figure 9 compares the open-
that, if the definition of a state takes ing flute passages from Strophes I-III;
independent of their predecessors; into account modes of behavior, ordi- similar procedures were employed in-
events in a (standard) 'first-order'
nal positions and other relative proper- dependently to generate each of the
chain are affected directly only by their
immediate predecessors; events in a ties, it becomes a simple matter to in- remaining instrumental parts.
troduce higher-order sensitivity into a M and Jam Factory allow Markov
'second-order' chain are affected by
two predecessors, and so on. nominally first-order matrix. In those analysis and generation with up to four
instances where L-dimensional ma- orders of discrimination, and even this
Zeroth-order chains are described by
trices indeed provide the most appro- liberal ceiling undoubtedly will be
a one-dimensional probability distribu-
tion, while first-order chains require priate representation, the fact that the raised as computers continue to gain in
the standard two-dimensional transi- theoretical number of cells in the ma- speed and memory. However, Baffioni
trix increases exponentially with Ncan and his collaborators suggest a point of
tion matrix. It is therefore logical to
be somewhat daunting. However, it is diminishing returns: "if [the order] is
extrapolate that each increment in often possible for programmers to ef- taken very large . . . the sample paths
order should add another dimension to
the matrix, e.g. a three-dimensional fect great savings in computer memory tend to reproduce long pieces of the
over this theoretical size, since only corpus from which the transition ma-
matrix for a second-order chain, or a
four-dimensional matrix for a third- transitions of nonzero probability need trix was extracted ('low originality?')
order chain. However, it can be shown be stored. and still the lack of general organiza-
Hiller and Baker used Markovchains

182 Ames,The Markov Process as a Compositional Model: A Survey and Tutorial

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
Fig. 10. Parameter graph for an unfinished composition byJohn Time: 0'00" 2'00" 4'00" 6'00" 8'00" 10'00"

Myhill. Each 2-minute 'section' is pieced together from many Active choirs: 1 2 4 2 1
short 'segments'; segment lengths are graphed logarithmically
from a minimum of 2 seconds to a maximum of 10. Separations Segment length Not applicable

range from 0 to 1. Separation: Not applicable

tion at [higher orders] will be clearly musical sources, the following compli- second matrix in the second section,
recognized" [33]. cation results: and so on. It might mean using tran-
Roads's PROCESS/ING program sition matrices to select certain 'un-
[When] models are being extracted
implements Markov chains of ex- froman existingsequencea newprob- shaped' attributes but leaving the re-
tremely high order, although Roads's lem arisesfor high-ordermodels.Most maining attributes to other selection
program was not intentionally based on of the long [sequences]willneverhave methods. In a real-time compositional
Markov'smodel [34]. Roads used PRO- been seen, and so there is no basison
which to make a prediction. ... A processor like MorJam Facto?y,it might
CESS/ING to create several composi- mean keeping the same transition ma-
compromisewhichworksverywellfor
tions for tape alone; these included two text is to use a range of models, for trices but subjecting the results to trans-
1975 pieces, prototype[35] and Plex (re- example, all models from order 0 to formations (e.g. mapping chromatic
vised 1982). The program was inspired order 5 (Clearyand Witten, 1984). notes to diatonic notes), which are
Whenmaking[predictions]the order
by the theory of 'finite automata', a 5 model is firstchecked,if it has [pre-
more easily amenable to real-time ma-
descendent of Information Theory. dictionstheyare]used,if not the order nipulation. There are also ways in
Each one of 26 automata is given con- 4 model is checkedand so on [37]. which Markov'smodel can be extended
trol over one of 26 attributes charac- directly to accommodate long-term
Each of Conklin's viewpoints gener-
terizing a cloud of sonic 'grains' (e.g. ates its own list of weighted predictions, shapes. One method is to allow the
starting time, duration, mean fre- so the program must include an arbiter
transition probabilities to evolve over
quency, temporal density, registral to mediate between lists and to estab- time; another is to implement the pro-
proximity of grains). The automata are lish a final order of preferences. If the
cess of selecting transition matrices as a
connected by a 26 x 26 'interconnec- Markov chain in its own right.
arbiter determines that there is no com-
tion matrix'; thus, in general, the attri-
mon ground between viewpoints, then
bute specified by an automaton during
the program must backtrack and revise Evolving
Transition Matrices
the j+ 1st cloud depends both upon the An unfinished and untitled work by
an earlier note. Backtracking is an arti-
past history of the automaton itself and ficial intelligence technique that was John Myhill,
which I partially pro-
upon the attributes specified by the re- not envisioned in Markov'swholly left- grammed, is the first composition, to
maining automata during the jth my knowledge, to employ transition
cloud. The process as a whole therefore to-right scenario, so in this respect the that evolve gradually un-
action of the arbiter takes Conklin's probabilities
may be regarded as a Markov chain in der strict parametric control. Myhill's
which the number of possible states is program beyond the scope of this
article. piece was to be constructed from five
given by the number of ways in which 2-minute sections, for a total length of
the attributes may be combined, while 10 minutes. The music was to be played
the order depends upon how many pre- OF by four antiphonal choirs situated
vious clouds are taken into account by TECHNIQUES around an auditorium in four loca-
the automata. CONTROL tions: on the stage, to the left side, to
Darrell Conklin has devised an ap- The most straightforward approach to the right side, and in the balcony. Fig-
proach to Markov modeling that medi- ure 10 shows how the antiphony was to
shaping Markov-generated music is to
ates between multiple transition ma- select excerpts manually from different evolve over the length of the piece.
trices, each 'viewing' the music from a chains and to cut and paste these ex- Only one of the four choirs plays at a
different perspective, e.g. durations, time in the outermost sections, sections
cerpts, again manually, into a satisfac-
absolute pitches, chromatic degrees, in- Markov chains, like all 1 and 5; the music trades off between
tory composite.
tervals between consecutive pitches in random processes, are inherently con- pairs of choirs in sections 2 and 4, and
the same voice, intervals between simul- all choirs are active continuously in sec-
traryand obstinate: over the short term
taneous pitches in different voices [36]. there is absolutely no guarantee that tion 3.
Conklin's approach embraces transi- their behavior will conform to the prob- This much of the compositional
tions of arbitraryorder; he takes advan- abilities set forth in the transition ma-
tage of the fact that a sequence of states trix. Given this fact, it is reasonable to
can be treated as a state in its own right include a degree of human interven- Matrix8. Thisone-choirtransition
to express his transition matrices as lists tion in the process; the cut-and-paste matrixis derivedfromFig.1la
of productions of the form: has been characteristic of Ko- whenthe separationis 0.75.
approach
[note j- n,..., note j- 2, note j- 1] tik's work, for this reason.
-> [predictions for note j]. However, Kotik represents the ex-
ception more than the rule; developers source destination
To select a production, Conklin's pro- of composing programs, for the most S L R B
gram simply steps through the list until part, seek automated methodologies S 0.25 0.25 0.50
it finds a production whose left side that can accommodate both content
matches the tail end of the music L 0.05 0.05
and form. This might mean simply in-
generated so far. Because the produc- R 0.05 0.05
structing the program to use one ma-
tions are derived through analysis of trix in the first section of the piece, a B 0.50 0.25 0.25

Ames,The Markov Process as a Compositional Model: A Survey and Tutorial 183

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
Separation

Separation

s L REBS LRL] SB LSI RS LB RB

Fig. 1la. (left) Transition probabilities for one active choir. Choirs are abbreviated as follows: S-stage, L-left, R-right and
B-balcony. Values are derived for a given source state, destination state and separation parameter as follows: (1) Of the four vertically
stacked rectangles that together make up the graph as a whole, locate the rectangle with the given source state indicated on the left.
(2) Use the key given along the bottom to determine the shading for the given destination state; locate the appropriate destination region
within the source rectangle. (3) Locate the given separation parameter along the scale at the top of the graph and sketch a vertical line in
this position from the bottom of the source rectangle (zero) to the top of the rectangle (unity). (4) The length of the line segment cutting
across the destinationregionwill then indicate the transition probability for the given source, destination and separation.

Fig. 1Ilb. (right) Transition probabilities for two active choirs. Choirs are abbreviated as follows: LR-left and right, SB-stage and
balcony, LS-left and stage, RS-right and stage, LB-left and balcony, RB-right and balcony.

process actually was implemented as a continuum of transition matrices for mation-Theoretic view and when they
program. Control over the antiphonal the two-choir sections. Matrix 8 shows are provided with terminal states to kick
process is exerted through two high- what transition probabilities result for the process back up into its higher-level
level parameters, both graphed in Fig- a one-choir section when the separa- modes. Two of the examples presented
ure 10: segment length and separation. tion in 0.75. To understand how the by Baffioni et al. illustrate thematic vari-
The segment length determines the pe- upper row of probabilities was derived ation using low-level matrices with very
riod of time separating transitions be- (stage as source state), first locate the nonuniform probabilities to represent
tween choirs in sections 1 and 5 or 'S' rectangle across the top of Figure particular themes. Two other examples
between pairs of choirs in sections 2 1la and then sketch in a vertical line for incorporate "some features of classical
and 4; the program rounded each seg- 0.75 separation. Notice that the upper tonal music", with matrices to simulate
ment length to the nearest second and one-fourth cuts across the dark region "chord prolongation, cadences, and
accumulated the residue into the next representing transitions from S to B modulation" [38].
segment. The separation is a single region. A similar procedure may be Capabilities to implement chains of
number that controls the antiphonal used to derive transition probabilities chains have been included among the
intensity. When this number is small from Figure 1 b. many features of HMSL which Burk,
(near zero), transitions occur between Polansky and Rosenboom have been
adjacent choirs; when the number is Chains of Chains developing since 1985 [39]. Like the
large (near unity), transitions occur In their 1981 paper, Baffioni, Guerra M U S I C O MP computer-composition
across the room or into the balcony, and Lalli proposed a hierarchical organi- 'language' of the 1960s [40], HMSL is
which Myhill defined to be 'separated' zation of Markov chains in which the a library of compositional procedures,
from all other choirs. 'low-level' transition matrices used to which a composer links together in a
Myhill treated the one-choir and two- select the musical details are selected main program of his or her own devis-
choir sections separately. For the one- using 'median-level' transition matri- ing. In addition, HMSL provides a set
choir sections, he devised a continuum ces; these 'median-level' matrices in of standardized procedural 'objects',
of transition matrices arranged along a turn are selected by 'higher-level' which facilitate implementation of
line from minimum to maximum sepa- matrices, and so on, to arbitrary levels hierarchic processes. Of specific rele-
ration, and he represented this con- of complexity. The approach makes vance to this article is the TSTRUC-
tinuum with the graph shown in Fig. most sense when the lower-level chains TURE object, which consists of the fol-
1la; the graph in Fig. 1lb represents his are 'highly redundant' from an Infor- lowing: (1) a list of n subsidiary objects,

184 Ames,The Markov Process as a Compositional Model: A Survey and Tutorial

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
which may be musical-event generators, formalism devised by Chomsky, an arbi- system of composition [50] and the
lower-level TSTRUCTURES or other trary structure can be represented as a germ-cell procedures used in certain
types of HMSL objects; (2) an n x n string of tokens, which can be either pieces by Scriabin and Schoenberg
transition matrix; and (3) a user- terminalor nonterminal.Productions are [51]. Some very diverse bottom-up ap-
supplied procedure for controlling the expressed as rewrite rules, that is, as proaches have been implemented in
TSTRUCTURE's behavior. Whenever a instructions for replacing nonterminal composing programs by Emmanual
subsidiary object completes its task, the tokens with subsidiarystrings (substruc- Ghent [52], William Buxton [53] and
TSTRUCTURE employs the behavior tures). If one begins with an archetype myself [54].
procedure to determine which object it and applies productions repeatedly To employ a bottom-up approach
should invoke next; the default beha- until all nonterminal tokens have been one must assume a hierarchic division
vior uses the transition matrix to select rewritten as terminal strings, then this of the whole into parts. This is incom-
an object probabilistically; however, final product is said to be an instanceor patible with Markovchains as they were
HMSL's designers intentionally have statementof the archetype. originally formulated, since Markov's
left their system open to alternative in- Chomsky's formalism is sufficient in original model recognizes neither hier-
terpretations of the matrix. theory, though not always in practice, archies nor even boundaries of any sort.
to embrace a wide variety of formalized However, the proposal of Baffioni,
compositional approaches, including Guerra, and Lalli removes this incom-
ALTERNATIVES TO gestalt hierarchies, fractal generation patibility to some extent.
MARKOV CHAINS and Markov chains. Unfortunately,
Markov chains have been grossly mis- Artificial Intelligence
Statistical Balances represented by mathematical linguists There has been some debate over the
who have dismissed them as a trivial past few years concerning which meth-
Composers who work with computer
instance of a 'context-free' grammar. ods of automated composition should
programs often have been concerned
more with medium-term balances be- Quite to the contrary, sensitivity to con- legitimately be considered artificial in-
tween musical attributes than with text is an essential characteristic of any telligenceand which should not. Many
short-term note successions. Although system of conditional probability, espe- accept that in order for a program to be
transition matrices exercise some influ- cially Markov chains [48]. called 'intelligent', it is sufficient that it
ence over balances-through the sta- Chomsky and his colleagues make a be able to undertake decisions on its
tionary probabilities-such influence is valid criticism, however, when they own; this has been the basis for the term
indirect at best. Unless a transition ma- point out that Markovchains are exclu- 'intelligent instrument', which has
trix is 'redundant', one cannot expect sively left-to-rightprocesses predicating been used by Laurie Spiegel in refer-
the stationary probabilities to become all actions upon past behavior. Such ence to her Music Mouseprogram and
manifest until quite a number of transi- systems may be adequate for emulating by Zicarelli and his colleagues in refer-
tions have gone by. For this reason, inanimate processes of nature, but they ence to M and Jam Factory.
are totally inadequate for modeling I adamantly disagree. Any reader
composing programs generally resort
to methods other than Markov chains planned activities, such as those in who simply thumbs through a repu-
when balances are important. The tra- which actions tend to be predicated table introductory text on artificial in-
ditional mechanism for directly realiz- toward future goals-e.g. language or telligence [55] quicklywill discover that
musical composition. AI has a well-established repertory of
ing balances is based on the mathe- Chomsky's
matical paradigm of random selection model, by contrast, is a top-downgen- techniques that bear little or no resem-
without replacement [41], but I have erative process in which the primary blance to Markovprocedures-aspects
recently developed a much more origins and goals can be expressly of Conklin's approach excepted. (Mu-
versatile technique called statistical stated in the archetype, while the paths sic Mousedoes not use Markov chains,
feedback [42]. connecting origins with goals (and con- nor, for that matter, does it employ AI
necting subsidiary origins and goals techniques.) Indeed, Markov's ap-
encountered along the way) can be proach is probably the most unintelli-
Top-Down Grammars
worked out in detail through the pro- gent decision-making mechanism im-
Top-down grammars were introduced
to musical theorists through the publi- ductions. Chomsky's model includes aginable, for it is a veritable paradigm
cations of Fred Lehrdahl and RayJack- Markov chains as a special 'context- of brute-force modeling. A Markov
endoff [43] and to the computer-music sensitive' case, and it offers much more. chain treats each circumstance as a spe-
community through the writings of cial case; AI, by contrast, employs gen-
Curtis Roads [44], Steven Holtzman Bottom-Up Processing eralized criteria expressed either as ab-
[45] and KevinJones [46]. Arising out A bottom-upapproach to composition solute rules or as relative preferences.
of the linguistic theories of Noam begins with a kernel of primary mate- A Markov chain becomes committed
Chomsky, top-down grammars quickly rial, subjects this material to a variety of irrevocably to each decision as it is
demonstrated great power in the for- transformations (e.g. inversion, retro- made; AI programs are capable of back-
mal (non-linguistic) study of structures grade, transposition) and pieces the re- tracking if they come to an impasse. A
and processes [47]. A formal grammar sults together into a piece of music. Markovchain regards a message (e.g. a
consists of an archetype(or axiom) and a Most prominent among the systematic musical composition) as a linear se-
set of productions.The archetype de- bottom-up procedures for composition quence of events; AI regards a message
scribes a structure in general terms, is the serial approach developed by as a network of relationships. These
while the productions provide the Schoenberg and extended by com- differences mean that where Markov-
means of deducing details of the struc- posers such as Pierre Boulez, Karlheinz chain programs are easy to implement
ture from generalities. In the symbolic Stockhausen and Milton Babbitt [49]; and quick to run, the code for an AI
other examples include the Schillinger program might well fill this journal,

Ames,The Markov Process as a Compositional Model: A Survey and Tutorial 185

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
and the execution time for such a pro- the analytic results will not be mean- simple objects into more elaborate ones-as con-
trasted with reductions, which simplify things.
gram might run into many hours. ingful.
The results produced by AI pro- random incident-an incident with unpredictable
As with any technique, the decision
outcomes. Probability theory circumvents the un-
grams (in conjunction with statistical of whether to employ transition ma- certainty of isolated random incidents by predict-
procedures, top-down grammars and/ trices depends on the compositional ing distributions of outcomes from many similar
incidents taken together.
or bottom-up processing) have much requirements of the moment. If Mar-
scalar-a number used to describe one attribute of
greater integrity; when used to emulate kov's model is sufficient to handle the
an object. (See also vector.)
traditional music, Markovchains at best problem at hand, then its ease and com-
stationary probabilities-a distribution predicting
have produced a garbled 'sense' of the putational efficiency make it a logical how often each state in the range of a Markov chain
original style, while existing AI pro- way of doing things. If standard first- will appear over the long term.

grams for traditional music have pro- order matrices will not suffice, one transition-the progress in a Markov chain from
duced results that are extremely similar one state to its successor during two consecutive
might consider Nth-order matrices, events.
to the real thing. evolving matrices or chains of chains. transition probability-the probability of making a
Since transition matrices are rarely transition to a specified destination state, given a
used in isolation, perhaps a blend of specified source state.
CONCLUSIONS approaches will be needed. If not, then transitionmatrix-a rectangular array detailing the
there are plenty of other techniques to transition probabilities obtained by enumerating
By no means can Markovchains be said every pair of source states and destination states
to occupy the cutting edge of progress choose from. from the range of a Markov chain and by determin-
in automated composition or analysis. ing the transition probability in each instance. The
Acknowledgments kth row of a transition matrix gives the probability
They have been around since the turn distribution for the state of the jth event in the
I am greatly indebted to the Kurzweil Foundation
of the century. They have been dis- for its continuing financial support and for the
chain under the assumption that thej-1 st position
resides in state k.
missed (sometimes unjustly) by mathe- Macintosh computer upon which this article was
written. uniform distribution-the distribution of a ran-
matical linguists and by AI researchers. dom process in which each outcome or state is
They have long been out of fashion in equally likely.
the music-theory establishment. De- Glossary
vector-a set of numbers used to describe two or
antiphony-musical contrast realized through
spite all this, Markovchains continue to physical separation of instruments in a perform-
more attributes of an object, e.g. a musical note
be exploited by composers who work might be described by a vector consisting of the
ance environment. note's starting time, duration, pitch and dynamic.
with computer programs. This persist- continuous-a set is continuous, in a practical This is a mathematician's definition of 'vector';
ent interest undoubtedly has to do with sense, if every pair of distinct elements is connected physicists use the word more strictly. (See also
by intermediate elements. scalar.)
the fact that Markov's model can be
conditional waiting count-the expected number of times that
adapted to accommodate just about probability-random incidents
said to be conditional when their outcomes
are
are a state will directly succeed itself in a Markov chain.
any discrete system of conditional prob- influenced by external factors. (See also waitingprobability.)
ability one might think of using in a discrete-a set is discrete if its elements can be waiting probability-the probability that the jth
composing program. In addition, Mar- represented by integers (e.g. item 1, item 2 .. .).
event of a Markov chain will reside in some state k,
given that the j-1 event also resides in state k.
st
kov's representation is straightforward, event-relation diagram-a diagram showing
since a chain's behavioral character- graphically how the various states of a Markov chain
References and Notes
istics are described entirely by the tran- progress between one another. Such diagrams are
most revealing when transition matrices are 1. Charles Ames, "Automated Composition in Ret-
sition matrix. This means that standard 'sparse', that is, when the great majority of transi- rospect: 1956-1986", Leonardo20, No. 2, 169-185
Markov chains are almost trivial to im- tion probabilities are zero.
(1987).
plement-to a large extent, the matrix expectation-an average value predicted
basis of a probability distribution.
on the 2. The official jargon for such processes is 'time-
is the program. variant Markovchains'. Before his creative momen-
Markovprocess or Markovchain-a chain of states, tum succumbed during the struggle with cancer
From the earliest of Markov-based that finally took his life in 1987, Myhill had worked
each determined by the outcome of a random inci-
composing programs, there have been dent. In addition, the following restrictions apply: out only the general form of a composition, the
two equally legitimate waysof obtaining (1) the range of states (i.e. the range of outcomes antiphonal process of which is discussed later in
available to the random incidents) is fixed, and (2) this article. Previously I had also had two direct
transition probabilities. Either one can each random incident is conditioned personal encounters with musical Markov chains:
by the out-
'compose' probabilities to suit general- come of its predecessor (or, equivalently, by the once in 1982 when Petr Kotik asked me to program
his interactive Markov-matrixeditor, and once in
ized compositional objectives, or one preceding state).
1983 when I wrote my own short program to illus-
can derive probabilities through analy- order of a Markov chain-the number of preced- trate basic Markov procedures for a class I was
sis of musical source material. In both ing states that directly influence a transition. Each teaching on automated composition.
increment in order adds an additional dimension
cases, it is critical to define the states of to the transition matrix. 3. Two favorite mathematical texts covering Mar-
kov chains are William Feller, An Introductionto
the chain in an appropriate manner. If probability-a number indicating the likelihood
ProbabilityTheoryand ItsApplications,3rd Ed., 2 vols.
one chooses to compose one's own that a random incident will produce a specified
(New York:John Wiley & Sons, 1967) and Joseph
outcome. Probabilities range from zero (impossi-
probabilities, then one should take into bility) to unity (certainty), with a continuum of
L. Doob, Stochastic Processes (New York: John Wiley
& Sons, 1953). My primary source was Samuel
account not only short-term transitions gradations in between. Karlin and Howard Taylor, A First Course in Stochas-
but also the long-term trends described probabilitydistribution-a function that associates tic Processes (New York: Academic Press, 1975); Kar-
lin and Taylor assume intensive mathematical
by the stationary probabilities. (Al- a probability with every conceivable outcome of a
random incident. Distributions can be either dis- background.
though stationary probabilities are te- crete or continuous, depending on the range of out- 4. Claude Shannon, "The Mathematical Theory of
dious to calculate by hand, it is easy to comes. Probability distributions are mathemati- Communication", Bell Systems Technical Journal 27,
incorporate a feature for extracting sta- cally identical to statistical distributions, except
that the former describes the ideal distribution of
379-423 and 623-656 (1948). See also Colin
tionary probabilities into a transition- Cherry, On Human Communication, 3rd Ed. (Cam-
a future population, while the latter describes the
bridge, MA: MIT Press, 1978).
matrix editor.) If one chooses to derive actual distribution of a population that already
exists. 5. Harry F. Olson, Music, Physics, and Engineering,
probabilities analytically, then one 2nd Ed. (New York: Dover, 1967). A description of
should take care that the source mate- production-an elementary operation within a Olson's work can be found in Charles Dodge and
generative process. Productions typically transform Thomas Jerse, "Composition with Computers",
rial is stylistically uniform; otherwise,

186 Ames, The Markov Process as a Compositional Model: A Survey and Tutorial

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions
Chap. 8 in ComputerMusic: Synthesis,Composition, 22. Darrell Conklin with John G. Cleary, "Model- Koenig's Ubungfiir Klavierand Thomas DeLio's
and Performance
(New York:Schirmer Books, 1985). ing and Generating Music Using Multiple View- Serenade;Ames [1] describes how all three of these
6. Richard C. Pinkerton, "Information Theory and points", Proceedingsof theFirst Workshopon Artificial compositions were made.
Intelligenceand Music (St. Paul, MN, 1988) p. 125.
Melody", ScientficAmerican194, 77-86 (1956). 42. The basic procedures for statistical feedback
23. Larry Polansky, Phil Burk, Robert Marsanyi, are introduced in Charles Ames, "Two Pieces for
7. Allen Irvine McHose, TheContrapuntalHarmonic
Dorothy Hayes and Mitchel Gass, HierarchicalMusic Amplified Guitar", INTERFACE.Journal of New
Techniqueof the 18th Century(East Norwalk, CT:
SpecificationLanguage Referenceand User Manual Music Research15, No. 1 (1986) p. 35; important
Appleton-Century-Crofts, 1947). (Oakland, CA: Center for Contemporary Music, refinements are described in Charles Ames, "Con-
8. Leonard B. Meyer, Emotionand Meaningin Music Mills College, 1988). currence", INTERFACE17, No. 1 (1988) p. 3.
(Chicago: University of Chicago Press, 1956). 24. JamshedJ. Bharucha, "NeuralNet Modeling of 43. Fred Lehrdahl and RayJackendoff, A Generative
9. Leonard B. Meyer, "Meaning in Music and In- Music", Proceedingsof theFirst Workshopon Artificial Theoryof Tonal Music (Cambridge, MA: MIT Press,
formation Theory", Chap. 1 in Music, theArts,and Intelligenceand Music (St. Paul, MN, 1988) p. 173. 1983).
Ideas(Chicago: University of Chicago Press, 1967).
25. David Zicarelli, M and Jam Factory,Computer 44. Curtis Roads, ComposingGrammars,2nd Ed.
10. Lejaren Hiller and Leonard Isaacson, Experi- MusicJournal11, No. 4 (1987) p. 13. More exhaus- (San Francisco: Computer Music Association,
mental Music (New York: McGraw-Hill, 1959; re- tive descriptions appear in the manuals provided 1978).
printed Greenwood Press, 1979). with both programs, available from Intelligent
45. Steven Holtzman, "A Generative Grammar
11. Lejaren Hiller and Robert Baker, "Computer NY Computer Music Systems, P.O. Box 8748, Albany, Definitional Language for Music", INTERFACE9,
12208, U.S.A. The M manual was written by No. 1 (1980) p. 51. Holtzman's synopsis of Roads
Cantata:An Investigation of Compositional Proce- David Zicarelli andJoel Chadabe (1987). TheJam
dure", Perspectives of NewMusic3 (1964) p. 62. [44] is more readable than Roads's original treat-
Factorymanual was written by David Zicarelli, An- ment.
12. Defined by coordinates of register, dynamics tony Widoff andJoel Chadabe (also 1987).
and rate of activity.See Iannis Xenakis, "Markovian 46. Jones [19].
26. Demonstrations7-11 are described in Charles
Stochastic Music-Theory"and "MarkovianStochas-
Ames, "Tutorialon Automated Composition", Pro- 47. This includes linguistic structures and pro-
tic Music-Applications", Chaps. 2 and 3 in Formal-
ized Music (Bloomington, IN: Indiana University ceedingsof the1987 InternationalComputerMusicCon- cesses but is not limited to them. See Maurice Gross
ference (San Francisco: Computer Music Associa- and Andre Lentin, IntroductiontoFormalGrammars,
Press, 1971). translated from the French by Morris Salkoff (New
tion, 1987) p. 1.
13. Gottfried Michael Koenig, "PROJECT2: A Pro- York:Springer-Verlag, 1970).
27. Note durations are generated using John
gramme for Musical Composition", ElectronicMusic Myhill's 'controlled' exponential distribution, lim- 48. This error has been perpetuated by a variety of
Reportsl, No. 3 (1970) p. 1.
iting the ratio between the maximum and min- writers, including Gross and Lentin [47], Roads
14. This program was first implemented on an imum durations to 8. See Lejaren Hiller, Charles [44] and Holtzman [45]. At its heart is a mistaken
Apple II computer in 1982, with myself program- Ames and Robert Franki, "Automated Composi- formulation of transition matrices as productions
ming to Kotik's specifications. Kotik learned the tion: An Installation at the 1985 International Ex- of the form X -- aX (X non-terminal; a terminal)
name for what he wanted to do from me, but the position in Tsukuba, Japan", Perspectivesof New when transition matrices should correctly be repre-
concept was entirely his own. He has since used the Music 23, No. 2 (1985) p. 215 n. 2. sented as setsof productions of the form aX -- abX
program to compose numerous pieces, beginning 28. If the range of states is not discrete, then the (X non-terminal; a, b terminal) where a stands for
with his 1983 Solos and Incidental Harmonies.At the source state and b stands for the destination
transition probabilities cannot be represented as a state.
Kotik's request, I adapted the program in 1988 for matrix. However, Markov's model may be general-
the Apple Macintosh, upgrading it in the process ized to encompass both discrete and continuous 49. See George Perle, SerialComposition
and Atonal-
to include capabilities for steady-state analysis and
for chains of chains. When during the spring of ranges by replacing the transition matrix with a ity, 3rd Ed. (Berkeley: University of California
conditional probability function of the form P(Xn, Press, 1972); and Charles Wourinen, SimpleCom-
1989 I faced the challenge of teaching automated
X,1). For example, consider a chain of real num- position(New York:Longman, 1979).
composition to non-programmers, the simplicity of bers in which Xn follows a Gaussian distribution
Kotik' program made it an ideal way of breaking 50. An algorithmic approach to composition that
whose mean is X,n. (such a chain simulates Brown- was very popular before World War II, but which is
the ice. ian motion).
all but forgotten today. SeeJoseph Schillinger, The
15. Curtis Roads, "A Systems Approach to Com-
29. Xenakis [12]. SchillingerSystemof Musical Composition(New York:
position" (Honors thesis, University of California Carl Fischer, 1941).
at San Diego, 1976). 30. Jones [19].
51. Cf. "'Free' Atonality", Chap. 11 of Perle [49]
16. Laurie Spiegel, "Sonic Set Theory: A Tonal 31. This way of graphing event-relations comes to and Allen Forte, TheStructureof AtonalMusic (New
Music Theory for Computers", Proceedingsof the me byway ofJones [ 19]; the notion of ordinal states
Haven, CT: Yale University Press, 1973).
SecondAnnual Symposiumon SmallComputers and the is the basis of the thematic procedures described in
Arts(1982). Baffioni, Guerra and Lalli [21]. 52. Ames [1] describes some of Ghent's work and
cites Ghent's articles.
17. A Russian about whose work I know only in- 32. Hiller and Baker [11 ].
directly. See R. C. Zarpov, Kibernetikai Muzyka 53. See Otto Laske, "Subscore Manipulation as a
33. Baffioni, Guerra and Lalli [21]. Tool for Compositional and Sonic Design" Proceed-
(Moscow: Nauk, 1971).
34. Roads [15]. ings of the 1980 InternationalComputerMusic Confer-
18. Peterson uses random walks, a process in which ence(San Francisco: Computer Music Association,
the motions of a travelling subject (e.g. a drunk) 35. Curtis Roads, prototype(manuscript, University
1980) p. 2, for a case study of Buxton's score-editing
are described by transition matrices. See Tracy L. of California at San Diego, 1975).
utility being used to produce a composition.
Peterson, "Interactive Digital Composition", Pro- 36. Conklin [22].
ceedingsof the1978 InternationalComputer Music Con- 54. See Charles Ames, "ProtocolMotivation, De-
ference (San Francisco: Computer Music Associa- 37. Conklin [22]. Conklin is referring to J. G. sign, and Production of a Composition for Solo
tion, 1978) p. 167. Cleary and I. H. Witten, "DataCompression Using Piano", INTERFACE11, No. 4, 213 (1982). See also
Adaptive Coding and Partial String Matching", the descriptions of Demonstrations10 and 11 in
19. Kevin Jones, "Compositional Applications of IEEETransInformationTheory,IT-30:2 (1984) p. 306. Ames [26].
Stochastic Processes", ComputerMusicJournal5, No.
2 (1981), p. 45. 38. Baffioni, Guerra and Lalli [21]. 55. E.g. Avron Barr, Paul Cohen and Edward
39. Polansky et al. [23]. Feigenbaum, The Handbookof ArtificialIntelligence
20. DeLio's Serenadefor piano (described in Ames
(Reading, MA: Addison-Wesley, 1981). See also
[1]) uses a simple transition process in conjunction 40. MUSICOMP is described by Hiller and Baker CharlesAmes, "AIin Music",EncyclopediaofArtificial
with many other techniques.
[11]. Intelligence(New York:John Wiley & Sons, 1987) p.
21. Claudio Baffioni, Francesco Guerra and Laura 638.
41. Random selection without replacement has
Tedeschini Lalli, "Music and Aleatory Processes", been employed to compose numerous pieces, in-
Proceedingsof the "5-Tage-Kurs" of the USP Mathe-
cluding Herbert Brin's SonoriferousLoops, G. M.
matisierung(BielefeldUniversity,1981) p. 272.

Ames,The Markov Process as a Compositional Model: A Survey and Tutorial 187

This content downloaded from 146.96.128.36 on Thu, 18 Dec 2014 21:12:09 PM


All use subject to JSTOR Terms and Conditions

You might also like