~FORMAL SEMANTICS FOR MUSIC NOTATION CONTROL FLOW
Zeyu Jin Roger Dannenberg
Carnegie Mellon University
School of Music, Pittsburgh, PA
[email protected]
Carnegie Mellon University
Computer Science Department, Pittsburgh, PA
[email protected]
ABSTRACT
"9&'J" ' ' "91 e: o- io'"9 Y' b1'!;w lOs ~Oe ' 11 " 9Q o- 3:err" c"q "~.ICr r. '+q ' f W
Music notation includes a specification of control flow,
which governs the order in which the score is read using constructs such as repeats and endings. Music theory
provides only an informal description of control flow notation and its interpretation, but interactive music systems
need unambiguous models of the relationships between
the static score and its performance. A framework is introduced to describe music control flow semantics using
theories of formal languages and compilers. A formalization of control flow answers several critical questions: Are
the control flow indications in a score valid? What do the
control flow indications mean? What is the mapping from
performance location to static score location? Conventional notation is extended to handle practical problems,
and an implementation, Live Score Display, is offered as
a component for interactive music display.
1. INTRODUCTION
Music notation has been evolving for centuries, creating
a symbolic system to convey music information. Early
music notation contained only lines and notes, which are
sufficient for communicating pitches and durations. It was
later that bar lines and time signatures emerged, grouping
music into measures and introducing the idea of beats.1
The notation for music control flow, like repeats and codas, came even later. Control flow helps to identify repeating structures of music and eliminates duplication in the
printed score. In the Classical period, control flow notation is closely tied to music forms such as binary, ternary
and sonata and is more of a musical architecture than a
means of saving space.2 Conventional practice for control
flow notation is well established. The literature [6, 15] has
formalized the notation in all kinds of ways and there is
little conflict among definitions. However, traditional music theory has not explored the possibilities of expanded
or enriched representations for control flow, and there is
1Far beyond formalizing the notion of beats, music notation led to
the "discovery" of time as an independent dimension that did not depend upon physical actions. In particular the musical rest is the first
direct representation of "nothingness" existing over time, or of time itself. Composers developed this concept centuries before the scientific
revolution, Kepler, Newton, graphs with a time axes, etc. [3]
2For example, "In practically all the sonatas of the earlier period the
exposition is repeated, as is indicated by the repeat-sign at its end, which
[..... I..
I........
AR?\
Figure 1: Control flow definition in Read's book
a gap between often simplified theoretical ideals and actual practice, especially in modern works. In practice, we
find nested repeats, exceptions and special cases indicated
by textual annotations, multiple endings, and symbols for
rearrangement.
We encountered this gap between theory and practice
in the implementation of music notation display software.
We needed a formal (computable) way to relate notation
to its performance, and we found conventional notions too
limiting to express what we found in actual printed scores.
To address this problem, we developed new theoretical
foundations based upon models of formal language and
compilation, and we applied these developments to the
implementation of a flexible music display system.
Music control flow is the reading order of measures
affected by control symbols including the time signature,
measures, repeats, endings, etc. It can also be viewed formally as a function f that maps the performed beat k to a
location of a score, <im, b>, a measure and beat pair. f(k)
describes the reading order of the score. In principle, we
can rewrite the score in the order f(1), f(2),... to create an equivalent score with no control flow (other than
reading sequentially). We call this the "flattened score"
or "performance score." Audio recordings and MIDI sequences are both in the order of the flattened representation of the corresponding score.
Existing music theory devotes little attention to control flow, and in fact, there does not seem to be even a
standard term for the concept of control flow. To define
the meaning of control flow symbols, the conventional
practice is to use words and visuals to illustrate the reading order. For example, Read uses arrows to mark the true
reading order (see Figure 1) [15]. This approach defines
309 2013 ICMC