You are on page 1of 14

Andreas Stefik,* Melissa Stefik,* and

Mark Curtiss
An Automatic Translator
*School of Electrical Engineering and Computer
Science
for Semantically Encoded
Washington State University
P.O. Box 642752
Musical Languages
Pullman, Washington 99164 USA

16265 SW Blanton Street


Beaverton, Oregon 97007 USA
{stefika, harrismel, markcurtiss}@gmail.com

Since the 1950s, scientists have attempted to codify microtonal Western notation, and a form of chro-
human language and to write automatic translators matic staff notation invented by Grace Frix. All of
from one language to another (Locke and Booth these musical languages can be automatically trans-
1955). This translation problem is strikingly diffi- lated to any others in Ammmp.
cult, caused not only by syntax, but by the meaning As we will demonstrate, not all translators are
or semantics of the languages themselves. In this ar- created equal. Some translators require an alteration
ticle, we present a translation problem of a different of a musical languages semantics, others require
nature: the translation between musical languages. changes to the graphics, and still others require both.
A musical language comprises both the symbols We see Ammmp as a system that translates musical
that represent sound or music and the underlying languages in the general sense, and present a frame-
meaning of those symbols. Musical languages show work for doing so. We chose microtonal notations
striking similarities to natural languages. Just as in to demonstrate languages that are extremely diffi-
natural language, similar symbols can imply the cult to translate, and we chose a chromatic staff and
same, or similar, underlying meanings. Musical lan- standard Western notation as examples of relatively
guages present different levels of information, rang- straightforward, non-microtonal, translations.
ing from very exacting to rough approximations of Since 2002, we have been using Ammmp technol-
what the performer should do. Trying to reconcile ogy, or pieces of it, to provide the Kepler Quartet
approximations with the exact is musically analo- with synthesized recordings of several of Ben John-
gous to the colloquial phrase lost in translation. stons string quartets (Johnston 2006). This technol-
A musical language translator may be beneficial ogy, as it evolved, was an invaluable tool for the
in studying historical music, unusually notated mu- quartet in hearing and understanding Ben John-
sic, or for simplifying the notation of a complicated stons musical language.
score. Just as there are a variety of spoken languages, In the course of this article, we first present re-
there is a vast and growing number of musical lan- lated work and the Ammmp music-notation frame-
guages. It is unreasonable to expect composers or work, including the translation framework. Next,
performers to understand all musical languages. we discuss both the basic concepts in microtonal
Translations may require expertise in two or more music theory and several music notations for which
notation systems, and translating musical lan- we present translators. Lastly, we discuss our meth-
guages by handeven with the required knowl- ods for automatic musical language translation, fo-
edgeis both tedious and time-consuming. cusing on the most difficult translation, back and
Thus, we present Ammmp, a general-purpose forth from Johnston to performance notation.
musical language translator and music-notation
editor. Ammmp has several musical languages and
translators implemented. Currently, we have imple- Background
mented Ben Johnstons microtonal notation, a form
of microtonal performance notation, standard non- Designing and implementing a music-notation edi-
tor is a serious undertaking. Algorithms as seem-
Computer Music Journal, 31:4, pp. 3346, Winter 2007 ingly simple as spacing a line of music have a rich
2007 Massachusetts Institute of Technology. history (Gourlay 1987; Haken and Blostein 1995;

Stefik et al. 33
Bellini and Nesi 2004), and determining a proper translate this semantic map into another language.
design for the system is equally challenging (Bran- We did not use a semantic-map-based approach, as
dorff, Lindholm, and Christensen 2005). In this sec- some musical languages are mere approximations of
tion, we present work relevant to translating others, making a baseline map hard to envision for
between languages, both musical and otherwise. our purposes.
Brown, in a 1958 talk at Georgetown University, Hajic, Hric, and Kubon show a translation system
said, I must begin by admitting, as is scarcely nec- for two very similar languages, Czech and Slovac.
essary, that I am at least several months away from They propose that, for very similar languages, a
being able to feed a new piece of French text into a simple word-to-word translation may suffice (Hajic,
computer and have an English translation come out Hric, and Kubon 2000). On a 10,000-word match
at the other end (Brown 1958). The translation sample, they showed results within about 90 per-
problem at this early stage was far from solved. cent accuracy. The musical languages we chose
What is enlightening about this text, however, is were not similar, but Ammmp does translate on a
that Brown said he was several months away in symbol-by-symbol basis.
1958, perhaps showing how deceptively difficult Because Ammmp is a music-notation editor, in
this kind of work can be. addition to a musical language translator, one par-
One element of particular difficulty in language ticularly difficult problem was music formatting. A
translation is the meaning of words, or semantics. variety of formatting algorithms exist (e.g., Blostein
Early work considered only the syntax of language, and Haken 1991; Haken and Blostein 1995; Bellini
which was soon shown to be inadequate for general- and Nesi 2004), but a treasure trove of information
purpose translation. This led to the infamous trans- on music formatting was created by Gourlay and
lation of the spirit is willing but the flesh is weak. his colleagues at The Ohio State University
This sentence was translated, or so the story goes, (Gourlay 1987; Gourlay et al. 1987; Hegazy and
into Russian and back into English. Upon transla- Gourlay 1987; Parrish and Gourlay 1987). These
tion back into English, the sentence became, The technical reports are an invaluable resource for any
wine is agreeable but the meat has spoiled. Al- designer of a music-notation editor.
though there are many conflicting versions of this Some of the work in the present article references
story, the point is that the meaning of the sentence microtonal music and microtonal musical lan-
was not preserved. For an excellent review of lan- guages. Several good resources explain microtonal
guage, including its myriad of complexities and dif- theory in more depth than is possible in this article
ficulties see Whitney (1998). (Chalmers 1992; Doty 1994). For more information
In our musical translations, we also had to con- specifically related to Ben Johnstons notation sys-
sider the implications of syntax and semantics. For tem, see Johnston (1964) and Fonville (1991). Espe-
example, in early versions of our music-translation cially important in Fonvilles work is a list of
system, we discovered we could obtain mathemati- Johnstons accidentals and their meaning. We ex-
cally accurate answers, but that occasionally the an- pand Fonvilles work here by showing Johnstons
swers would involve notes with nearly 40 or 50 notation up to the 61st partial, whereas Fonville
microtonal accidentals. In other words, our issue showed only up to the 31st.
was the opposite of the problem natural language We translate among four different musical lan-
researchers had. Our initial results technically pre- guages in this work: Ben Johnstons, performance
served the meaning of an individual notationse- notation, standard Western notation, and a chro-
manticsbut the syntax was extremely complex. matic staff. Ben Johnstons graphical notation looks
Semantic maps were used by Raman and Alwar very similar to common Western notation, but it
(1990) to solve translation problems. In that work, assumes the score is in just intonation and adds sev-
host languages, like English, are translated into a eral microtonal accidentals to account for this. Al-
semantic map, and then a generator is used to though his notation has evolved over his lifetime,

34 Computer Music Journal


Figure 1. Results of the tion (second from the top), equal-tempered approxi-
translation among all four the numbers indicate cents mations to the Johnston
musical languages we im- deviations from equal tem- and performance notation.
plemented. Johnston nota- pered pitches. Standard All of these translations
tion (top) uses numbers Western notation (second were accomplished auto-
and symbols to indicate from bottom) and a chro- matically by Ammmp.
microtonal pitch varia- matic staff notation (bot-
tions. In performance nota- tom) are close

we implement his current system in Ammmp. Per- Microtonal notations, like Harry Partchs (1974),
formance notation is any microtonal notation that are more varied in number and style than their non-
displays cents values next to an equal tempered microtonal counterparts.
pitch. Our particular variation displays these cents
values as accidentals near the note, but it is com-
mon to see them above a note. Translation Framework
Standard Western staff notation probably needs
no introduction, but the chromatic staff does. The The design goal of the Ammmp project is to create a
chromatic staff (of which we present a version by robust music-notation editor with the ability to
Grace Frix) is similar to standard Western notation, translate between alternative musical languages,
except that each of the twelve notes of the chro- both graphically and mathematically. This includes
matic scale has its own line or space. The point of changing historical musical languages into their
a notation like this is that it removes the need modern equivalent and vice-versa. Creating a
for key signatures, making all keys graphically framework for musical languages such as this re-
equal. To motivate the translation problems pre- quired us to write a custom sound-synthesis engine,
sented in this article, Figure 1 presents a translation a graphics engine, a translation framework, and a
between all four of the musical languages we chose. large array of GUI components. Because there has
Lastly, our goal in creating a music-language been a recent interest in the design of these systems
translator arose owing to the vast complexity of (Brandorff, Lindholm, and Christensen 2005), this
musical languages, especially as they have grown in section of the article offers an alternative approach
the 20th and 21st centuries. Although a number of for the design of modern music-notation frame-
sources exist, for a good overview of a number of works. Figure 2 shows the primary components in
20th-century music notations, see Stone 1980. the Ammmp architecture.

Stefik et al. 35
Figure 2. Primary compo- Figure 3. Screenshot of the
nents in the Ammmp Ammmp interface.
architecture. We imple-
mented our architecture
in Java.

Figure 2

Figure 3

The first component in Ammmp is the Main- 1995), the user interface is sufficiently featured for
Frame, which is the primary GUI component. Al- common music-notation operations. As can be seen
though Ammmp is not a fully featured commercial in Figure 3, users can adjust time signatures, clefs,
music-notation editor like Finale, Sibelius, or Lime notes, accidentals, and other related items using a
(Blostein and Haken 1991; Haken and Blostein what you see is what you get interface.

36 Computer Music Journal


Because Ammmp is concerned with musical lan- AbstractController determines what action to take
guages, we include a component called the Nota- for a component when it is hit.
tionManager, which knows what languages can be Score objects are the primary representation of
translated. For example, this component recognizes the music itself. The Score contains what might be
that a Johnston-to-performance translator is avail- expected: measures, notes, clefs, time signatures,
able on the system. and musical languages. Score objects store an Ab-
The graphical representation of the music in stractNotation object, which is an abstraction of a
Ammmp is created in a MusicPanel component. musical language. In computer terms, we use what
The MusicPanel contains several important class is called the strategy design pattern to accomplish
hierarchies that control the primary functionality of this (Gamma et al. 1995). This technique allows us
the program, namely the AbstractScorePlayer, the to swap out how a given musical language is repre-
AbstractScoreIO, the AbstractHitDetector, the Ab- sented, graphically and mathematically, without al-
stractController, and the Score. Each component in tering the way our graphics library interacts with
this hierarchy of classes is music-language neutral, the graphics systems.
that is, other Ammmp components usually go un- Last, we have the AbstractPositioner and the Ab-
changed when we translate between arbitrary musi- stractNotationConverters. The AbstractPositioner
cal languages. moves notes, measures, and other elements on the
The AbstractScorePlayer object converts the screen and the AbstractNotationConverters trans-
Score object into sound. MIDI is a common tool for late between two given AbstractNotation objects.
notating music in an editor like Finale or Sibelius.
To implement microtonal music, however, MIDI
support is incomplete. Specifically, the only method Review of Microtonal Music Theory
available for creating microtonal music with MIDI
is to use pitch bends. One pitch bend is allowed per While Ammmp attempts to encode the semantics
channel. Consider an example where some MIDI of musical languages, any that involve microtones
channel had two notes playing simultaneously and can be very difficult to automatically translate,
a pitch-bend message was sent to that channel. This which makes them good examples. Microtonal the-
pitch bend message would cause both notes to ory is, however, relatively complex, and as such, we
change pitch. Because only 16 MIDI channels are offer a short review section here.
typically available, only 16 unique microtonal Microtonal theory is largely broken into two cate-
pitches can be performed simultaneously. To over- gories, the tempered tunings and the just tunings.
come the limitations of MIDI, we built a custom Just tunings use integer ratios to represent pitches,
sound-synthesis engine into Ammmp. whereas pitches in a tempered tuning deviate from
The AbstractScoreIO hierarchy allows various those ratios. The most common form of tempera-
types of file-saving to occur. In our case, because ment is equal temperament, and in particular,
we focus on the semantics of musical languages twelve-tone equal temperament, or 12-TET. (This is
which is typically not encoded into standard music the tuning used on the modern piano.) In 12-TET,
file formatswe decided to use the Java languages notes on the scale are derived logarithmically, the
default file-saving mechanism: serialization. It frequency relationship being 2i/12 for any note, where
would be advantageous to integrate Ammmp files i is the scale step desired. In equal temperament
into the MusicXML standard (Good 2001), but lan- (and in just intonation as well), the fundamental fre-
guage translation, semantics, and microtones signif- quency of notes are relative to a base frequency,
icantly complicate this process. commonly referred to as the 1/1 (Partch 1974). The
The next two primary components in Ammmp 1/1 literally means a frequency with which all other
are the AbstractHitDetector and the AbstractCon- notes are compared. Generalizing, if z-tone equal
troller. The AbstractHitDetector determines the ob- temperament is desired, we have m = x 2y/z, where
ject with which the user is interacting, and the z is the number of divisions of the octave, m is the

Stefik et al. 37
Figure 4. A 3-limit lattice Figure 5. A 5-limit lattice Figure 6. A 5-limit lattice
in just intonation. Al- in just intonation. of notes in Ben Johnstons
though often presented on musical language.
a horizontal axis, the di-
rection is arbitrary, and we
are following Johnstons
usage.

Figure 5
final frequency, x is a base frequency, and y is a
scale step. For a thorough overview of tempera-
ments, see Barbour (1951) and Jorgensen (1991).
In comparison to the mathematical structure of
equal temperament, just intonation uses ratios to
represent pitches. Typical just-intonation systems
are broken into limits. A 5-limit just intonation
system uses ratios in which the largest possible
prime number in any numerator or denominator
factorization is 5. Likewise, the ratios used in an
n-limit system are limited to prime factors no larger
than n. For our theoretical purposes, it is conven-
ient to consider all just intonation pitches as pitch
classes, existing only between the unison (1/1) and
the octave (2/1).
A common way to visualize a just-intonation
system is by using a lattice (Johnston 1976/1977;
Fokker 1949). A lattice is a graph in which each Figure 6
node represents a just-intonation pitch, and each
edge represents a ratio relationship between two
pitches. In Figure 4, for example, the interval be- Musical languages like Ben Johnstons are a one-
tween 1/1 and 3/2 is 3/2. Lattices often have a cen- to-one mapping from a lattice to notes on the staff.
ter node on the graph, typically 1/1. Figure 6 shows a 5-limit lattice of notes in Ben John-
As an example, consider the 3-limit lattice pre- stons musical language.
sented in Figure 4. Because this lattice is 3-limit, As an example of how pitches are calculated in
we can say that the dimensionality of the lattice is this system, consider 15/8 in Figure 5. To calculate
one, a line. Note that a one-dimensional lattice, in this pitch, we go to the east and then the north, or
this case, is equivalent to a Pythagorean tuning. alternatively, the north and then the east. Regard-
Figure 5 expands this lattice to 5-limit, creating a less of the steps, the calculation is one step in the
2-dimensional lattice. positive direction for a 3-limit system and one step

38 Computer Music Journal


in the positive direction for the 5-limit system. This We designed an alternative vector representation
implies our final ratio is 3151, although this gives us of a Johnston note, which is our representation of
the value 15. We then must octave-reduce the num- choice in Ammmp. Specifically, we chose to repre-
ber to fall within one octavei.e., take a value be- sent any given note as a tuple <c, v>, where c is a
tween 1/1 and 2/1and thus we divide the number note name and v is a vector of accidentals. Thus,
by 8. Similarly, for 64/45 we would have a note re- our representation of Johnstons language ignores
duced from 32 52, because, in this case, we are lattice relationships and stores only the note name
going in the negative direction for both axes. and the number of accidentals into a tuple. The first
Note that in this system as described, notes are position of the vector, v, is equivalent to the num-
perfect fifths apart in the northsouth dimension. ber of syntonic commas, the second the number of
However, because note names repeat, and the ratios sharps, the third the number of sevenths, the fourth
are different for these notes, we designate the differ- the number of arrows (elevenths), and so on.
ence with a or + symbol. This extra symbol indi- As an example, for the tuple <G, {1}>, the note
cates a syntonic comma, or the ratio 81/80. The rule would be G+. Similarly, <G, {1,2}> would be Gx,
here is that a perfect fifth above any variant of D, pronounced G minus double sharp. This represen-
like D-flat (D !), D-sharp (D#), or D !+, in the lattice tation has the advantageous property of using vector
adds a syntonic comma, or likewise below an A. addition to change accidentals. In the computer,
Similarly, a major third above any D also adds a syn- changing from Gx to G# reduces to adding the
tonic comma. Interestingly, this language preserves vector {0, 1} to the previous note. This vector repre-
just intonation relationships via extra accidentals. sentation will be used for the rest of this article.
To calculate the note name for the ratio 15/8, we
go to the right from the 1/1, or C, to the note E, add-
ing a major third. Next, we go north from E, adding Translation Algorithms
a perfect fifth. This gives us the final note of B.
It is often convenient to represent a lattice mathe- Translating from Johnston to Performance
matically. To do this, we first define a function r(x),
where x is either a real number or a ratio that can To create new musical languages in Ammmp, and
reduce a particular note to a pitch class within a 1/1 translations for them, several steps must be taken.
and a 2/1. Thus, if we have some set of primes in First, an AbstractNotation object must be created,
our lattice p0 . . . pn1 and a set of integer exponents which represents the mathematical meaning of a
for each prime m0 . . . mn1, then to determine the musical language, aside from the graphics. Second,
pitch-class fundamental frequency of a note, we an AbstractNotationConverter object must be cre-
compute ated, which literally translates two notation objects.
In this section, we present an algorithm translating
n1
note = r pimi (1) from Johnstons musical language to performance
i =0 notation.
Equation 1 shows how to calculate fundamental fre- Translating from Johnstons musical language
quencies and illustrates that we ignore octaves in into performance notation is, essentially, the pro-
our calculations. As a succinct representation of a cess of translating the note and its accidentals into
lattice, we use a vector. Thus, the note G could be cents values. This translation requires that we de-
represented as v = {1}, where the first position in the fine several equations and variables. The first equa-
vector is the prime 3, and every subsequent position tion we define is the usual function for translating a
is the next prime. As an example, the note A#+ would ratio x to cents p as
be represented as v = {2,2} and would be calculated
p(x) = log2(x) 1200 (2)
as n = r(32 52). This can be seen in Figure 6 by com-
paring the positions of G and A#+ relative to C. where x is a real number.

Stefik et al. 39
Figure 7. Accidentals used
in Ben Johnstons musical
language, expanded to a
61-limit system from
Fonville (1991). The cents
values are approximate.

We also must define a separate vector j for this


conversion. The vector j consists of the ratios for all
elements in v. For example, j[0] = 81/80, the syn-
tonic comma, and j[1] = 25/24, a sharp. Figure 7
shows a 61-limit list of Johnston accidentals. Thus,
each element of j corresponds to the ratio represen-
tation of an accidental in Ben Johnstons language.
Assuming the note C in Johnstons language has a
constant value of zero cents, and recalling in our
<c, v> tuple that c is the ratio of a note and v is the
number of accidentals, the equation for translating
from Johnstons language to performance notation
is given by
n1

cents = r p c j[i]v[i] (3)
i =0
Owing to memory-overflow issues, it is often
convenient to first convert ratios into cents values.
Thus, for this next equation, we define the vector h,
which contains the cents value of a ratio represent-
ing a Johnston accidental. For example, if j[0] =
81/80, then h[0] = p(81/80) = log2(81/80) 1200
21.506. With cents values now in h, we can add the
values of each element in h and add the value of the
note c, giving the performance notation value. This
yields

(h[i] v [i])
n1
cents = r p(c) + (4)
i =0

For example, if we have the tuple <1/1, {1}> the


note would have the ratio 1/1 81/80, the value of
one syntonic comma, and thus the final note would
be C+ in Johnstons language. Using the first equa-
tion, translating to performance notation then gives
p(1/1 (81/80)1) = p(81/80) 21.506. As expected,
using the second equation gives the same value,
p(1/1 + (p(81/80) 1) 0 + (21.506 1) 21.506. Simi-
larly, given a tuple <5/3, {1,1,1} >, the note value
would be A#7. This yields p(5/3 (81/80)1
(25/24)1 (35/36)1) 884.8, approximately an A on
the modern piano minus 15.2 cents.
Although the ratio 35/36 may appear to be a typo-
graphical error, recall that the accidental of a 7 in
Johnstons language actually indicates a downward
pitch bendnot upward, like most other acciden-
tals. This is not unique in Johnstons language. The

40 Computer Music Journal


Figure 8. An example mea-
sure from Toby Twinings
Chrysalid Requiem (Twin-
ing 2002). Used by permis-
sion of Toby Twining
Music, all rights reserved.

accidentals for 19, 47, 53, and 59 also indicate


downward pitch bends.
Last, it is important to remember that these
equations translate only a single note in Johnstons
language into performance notation. The entire con-
version process must iterate over all notes in a given meaning, since v1 3. In this instance, Ammmp will
score. In Ammmp, we limit the vector v to some determine some <c2, v2> where x 1151, but v1 v2.
constant size, largely because using higher limit Thus, in effect, although the sound is the same, the
accidentals in the Johnston system is uncommon. original vector was lost in translation.
Thus, we define v n, and we choose n = 17, indi- Although this lost in translation problem is
cating a 61-limit system. Because each vector is of troublesome, another concern of translation is
constant size (17), the upper bound of our algorithm equally important: complexity. A given note in
has a running time linear to the number of notes. Johnstons language can either be simple, like C =
1/1, or complex. It is important to avoid complex-
ity, as a greater number of accidentals decreases
Translation from Performance to Johnston readability. Thus, we present another equation that
defines what we mean by complexity. Complexity
Creating a performance-to-Johnston translator re- is defined as
quires only one addition in the Ammmp architec- n1
ture, a new AbstractNotationConverter object. In comp(v) = v[i] (5)
i =0
this section, we discuss the algorithm used in this
object. Notice that, in the previous translator, there for some vector v. This complexity equation states
is a simple equation that reduces a note and its that we add the absolute value of each v[i], giving
accidentals into a cents value in performance nota- the total complexity of the note. For example,
tion. Now consider the opposite case: translating comp({1,1,5}) = 7 and comp({1,2,3}) = 6. Intuitively,
from performance notation to Johnstons language. measuring complexity is important because users
The fundamental issue is to take a value from per- prefer to read notes with few accidentals.
formance notation, a real number x, where x 0 As a real-world example of the lost in transla-
and x < 1200, and translate it into the correct num- tion problem that also highlights the importance
ber of accidentals for the correct note in Johnstons of considering complexity during translation, we
language. present one measure of a score by composer Toby
Mathematically, the problem is to translate a real Twining. Figure 8 shows a particularly complex
number x to a tuple <c, v>, where c is a note and v is measure of Twinings Chrysalid Requiem (2002),
a vector of accidentals. We define v as having a fi- using one version of his notation. In the language
nite size, essentially limiting v n. Unfortunately, we have been using until now for representing
in practice, this translation is imperfect. pitches, we can say that Twining uses v 3, where
We now present an example of the lost in trans- the first note has the tuple <F, {9,9,28}> and the
lation problem. Suppose c1 = {1/1} and v1 = {0,0,1}, second note has the value <G, {8,9,27}>. This gives
which represents the note C7 in Johnstons lan- the first note a complexity rating of 46 and the sec-
guage. Also, suppose we translate <c1, v1> to perfor- ond note a rating of 44, a complicated section of
mance notation, making x 1151. music. We ran this section of Twinings score
Now suppose that we translate x back to some through Ammmp with various table sizes and val-
<c2, v2>, where we do not know the original <c1, v1>, ues of n in v n, the results of which are in Table
and that we arbitrarily select the size of v2 to be 2, or 1. Figures 9 and 10 show how the complexity values
v2 2. Therefore, because we have limited v2 2, change in relation to the original music score with
we have made it impossible to retrieve the original various vector sizes.

Stefik et al. 41
Figure 9. Graph showing Figure 10. Graph showing for the 12,000-element
the complexity of the note the complexity of the note table with v 1, because
<F, {9,9,28}> before and <G, {8,9,27}> before and the value is much larger
after translation. after translation. This than the others (1064).
graph omits the data point

Table 1. Results of Translating Two Notes from Toby Twinings Chrysalid Requiem
Table Size |v| <F, {9,9,28}> Complexity <G, {8,9,27}> Complexity

1,200 1 <D, {97}> 97 <G, {27}> 27


12,000 1 <D, {97}> 97 <D, {1064}> 1064
1,200 2 <A, {3,2}> 5 <D, {6,3}> 9
12,000 2 <E, {10,13}> 23 <G, {4,7}> 11
1,200 3 <A, {3,2}> 5 <B, {2,2,1}> 5
12,000 3 <F, {3,7}> 10 <G, {4,7}> 11
1,200 4 <A, {3,2}> 5 <B, {2,2,1}> 5
12,000 4 <C, {0,3,1,1}> 5 <D, {1,3,2,1} 7

In general, when translating the case of v n, a translation with a decimal places of accuracy, we
n > 1, we found our translated pitches to be far sim- need to store 1200 10a entries in our table. Thus, a
pler than this version of Mr. Twinings score. The table that is accurate down to 0.1 cents requires a
fact that for n = 1 the complexity was very high is table with 12,000 entries.
not surprising, as this implies it would take a num- The first step in the translation algorithm in-
ber of syntonic commas to yield the same pitch that volves generating vectors. Recall that vectors in this
the composer uses. system consist of integers of any size, positive or
With tools in place for analyzing the complexity negative. Also recall that we would prefer to gener-
of a note, vectors representing approximations to an ate vectors with low complexity, which we accom-
original pitch value, and a real-world example, we plish using a counting algorithm. The only exception
now demonstrate the Ammmp translation algo- in our case is to determine a bound on counting and
rithm. In essence, Ammmp pre-processes a large to allow negative numbers while counting. The first
table and stores a Johnston value for any particular condition is met by allowing the user to set an arbi-
performance value. This allows us to query by a per- trary bound. Essentially, this means Ammmp will
formance value in the table, retrieving a very close consider accidentals with 2, 3, or n sharps before
approximation of the original Johnston note. considering an accidental beyond the sharp. The
This approach works in Ammmp but does require second condition is trivial. Instead of counting in
a good deal of memory for the translation table. For the usual way (1, 2, 3, 4, 5, etc.), we count our vec-

42 Computer Music Journal


Figure 11. Total time to
create various precision
tables for translating from
performance to Johnston
notation.

tors as 0, 1, 1, 2, 2, 3, 3, and so forth. For example,


if our bound is 1, and v 2, then we might count
{0}, {1}, {1}, {0,1}, {1,1}, {1,1}, {0,1}, etc. Future
work may explore these counting algorithms further.
The next step of the algorithm involves generat-
ing the Cartesian product M = v Notes, where
Notes = {A,B,C,D,E,F,G}. Now consider the simplest
of all vectors in this system, v = {0}. The Cartesian
product then gives the following tuples: <A, {0}>, <B,
{0}>, <C, {0}>, <D, {0}>, <E, {0}>, <F, {0}>, and <G, {0}>.
The philosophy behind this part of the algorithm is
to add sets of elements to the table that are simple
first, then generate more complex sets. Because we
know that {0} is as simple as possible, we generate
all possible notes with that vector.
The third step of the algorithm is the conversion tween ranges of notes. Data such as this helps to in-
of the tuple <c, v>, in Johnstons language, into x, or dicate how often collisions occur in table genera-
performance notation. This step is the same as the tion and also whether certain notes are more
conversion from Johnston to performance notation difficult to fill in the table than others.
discussed in the previous section. After x has been Timing for each run begins when the first vector v
calculated, we can then calculate its final position is generated and continues until the table is filled.
in the table. If the final cents value of the note is x Figure 11 shows the results of the simulation times.
and our desired table accuracy is a, then our final The time appears to increase exponentially as the
position can be calculated by p = x 10a. As an ex- table size increases. Figure 12 shows the average
ample, if x = 78.345 and a = 3, then we know our number of collisions that occur for each cell in the
table size is t = 1,200,000 = 1,200 103 and our final table. Because we know that collisions are in-
position, p, is p = x 10a = 78.345 103 = 78,345. The evitable, and because x is an approximation, we
final step of the algorithm is to repeat the above steps track these collisions in comparison to the size of
until the table is filled. the table. In general, collisions increase as the table
To evaluate this algorithm, we ran several simula- size increases, and their number appears to be rela-
tions for generating the table. We ran simulations for tively linear with the size of the table.
tables of size 1,200, 12,000, 120,000, and 1,200,000. In addition, information was extracted from the
For each table size, five simulations were run, and algorithm to derive collision data between ranges of
the average time to fill the table was recorded for notes. Dividing the table into twelve parts gives the
each run. In addition, we tracked the total number usual notes on the piano. Figure 13 gives a closer
of calculations required to fill the table. look at collisions in each area of the table. Interest-
Because Ammmp accounts for approximate val- ingly, Figure 13 suggests that for smaller tables it is
ues of x, collisions to positions in the table occur. more difficult to fill the regions located around the
Collisions can be handled by either choosing the notes C and F.
value with the lowest complexity, eliminating the The benefit of this approach is that translating
colliding value, or a heuristic. We chose the simplest back into Johnstons language is O(1) for each note
of the approaches and eliminate the new value. In in the score. This makes the total algorithm O(n)
future work, we may compare this approach to a for any arbitrary number of notes, after a table has
different collision-handling mechanism. Here, we been generated one time.
tracked the average number of collisions in the en- One might ask why we chose table generation
tire table and the average number of collisions be- and reference-based algorithms over continued frac-

Stefik et al. 43
Figure 12. The average Figure 13. Average number
number of collisions per of collisions between
cell in the conversion notes.
tables.

tions and prime factorization. Although it is likely


possible to find a solution using factoring methods,
table-generation techniques like ours have signifi- staff, including one suggested by Arnold Schoen-
cant benefits. First, table generation is fast for small berg, although the core idea is to remove the need
tables and must be run only one time. Once a table for accidentals by making individual lines and
is created, each individual note can be translated in spaces chromatic pitches. Several examples can be
O(1). Further, using an algorithm such as ours to found at the Music Notation Modernization Associ-
control how the table is constructed allows us to ations Web site at www.mnma.org. We chose Grace
use minimization techniques to limit the complex- Frixs variation largely because it did not require us
ity of individual notes. to create new fonts or graphics in Ammmp.
Additionally, this algorithm also allows us to cus- Adding different musical languages into Ammmp,
tomize the table for accidentals that humans would assuming a good understanding of music notation,
likely prefer to see. For example, our table should be is fairly easy. Because no new art was needed,
filled with sharps and flats before upside-down adding these two additional languages took one
numbers and arrows, as these accidentals are less programmer a few hours. Additional components in
common and more difficult for a human to under- Ammmp, like the custom synthesis engine and for-
stand. It may be possible to take all of these consid- matting algorithms, automatically adapted to the
erations into account with prime-factorization new musical languages without modification.
approaches, but we found this alternative to be sig-
nificantly more complex.
Conclusion
Translators Unrelated to Tuning The principal contribution of this work is to intro-
duce the idea of translating between music lan-
To show the generality of our architecture, we also guages, including a musical version of the phrase
implemented two additional languages and transla- lost in translation. It is unfortunate that a great
tors between these and all previously discussed deal of research has been done in translation of nat-
systems. These two systems include a language rep- ural language, yet musicians analyzing historical
resenting standard Western, non-microtonal nota- texts must work more or less by candlelight, with-
tion, and a chromatic staff invented by Grace Frix. out technological assistance or guidance. We intend
Many variations exist on the idea of a chromatic to help in this regard by creating Ammmp, a frame-

44 Computer Music Journal


work for musical language translation. It is our hope Gamma, E. , R. Helm, R. Johnson, and J. Vlissides. 1995.
that future researchers will consider musical- Design Patterns: Elements of Reusable Object-
language translation for other types of musical lan- Oriented Software. Boston, Massachusetts : Addison-
guages, perhaps neumes, mensuration symbols, or Wesley.
any of the complex musical languages developed in Good, M. 2001. Musicxml: An Internet-Friendly Format
for Sheet Music. Paper presented at the XML 2001
the 20th and 21st centuries.
Conference, Orlando, Florida, 914 December.
For future work, we intend to explore methods al- Gourlay, J. S. 1987. Spacing a Line of Music. Technical
lowing other researchers to plug into Ammmp, Report. Columbus, Ohio: Department of Computer and
simplifying the process of adding new musical lan- Information Science, The Ohio State University.
guages. In addition, it may be fruitful to design cat- Gourlay, J. S., et al. 1987. Computer Formatting of Mu-
alogs of musical languages in terms of how well sic. Technical Report. Columbus, Ohio: Department
they translate to other languages, and whether the of Computer and Information Science, The Ohio State
translation occurs by approximation or whether it University.
is exact. Another goal we have considered is creating Hajic, J., J. Hric, and V. Kubon. 2000. Machine Transla-
a semantic map for music, where any known lan- tion of Very Close Languages. Proceedings of the Sixth
guage can be plugged into the map, and then auto- Conference on Applied Natural Language Processing.
Seattle, Washington: Morgan Kaufmann, pp. 712.
matically translated to any other known language.
Haken, L., and D. Blostein. 1995. A New Algorithm for
Although these are lofty goals, we see this article as Horizontal Spacing of Printed Music. Proceedings of
a first step on the road toward musical language the 1995 International Computer Music Conference.
translation. San Francisco, California: International Computer Mu-
sic Association, pp. 118119.
Hegazy, W. A., and J. S. Gourlay. 1987. Optimal Line
References Breaking in Music. Technical Report. Columbus,
Ohio: Department of Computer and Information Sci-
Barbour, J. M. 1951. Tuning and Temperament: A Histori- ence, The Ohio State University.
cal Survey. East Lansing, Michigan: Michigan State Johnston, B. 1964. Scalar Order as a Compositional Re-
College Press. source. Perspectives of New Music 17(2):5676.
Bellini, P., and P. Nesi. 2004. Automatic Justification and Johnston, B. 1976/1977. Rational Structure in Music.
Line-Breaking of Music Sheets. International Journal American Society of University Composers 12:
of Human-Computer-Studies 61(1):104137. 102118.
Blostein, D., and L. Haken. 1991. Justification of Printed Johnston, B. 2006. String Quartets Nos. 2, 3, 4, and 9.
Music. Communications of the ACM 34(3):8899. New York: New World Records. Audio compact disc
Brandorff, S., M. Lindholm, and H. B. Christensen. 2005. 80637-2.
A Tutorial on Design Patterns for Music Notation Jorgensen, O. H. 1991. Tuning: Containing the Perfection
Software. Computer Music Journal 29(3):4254. of Eighteenth-Century Temperament, the Lost Art of
Brown, A. F. R. 1958. Language Translation. Journal of Nineteenth-Century Temperament, and the Science of
the ACM 5(1):18. Equal Temperament Complete with Instructions for
Chalmers, J. 1992. Divisions of the Tetrachord. Lebanon, Aural and Electronic Tuning. East Lansing, Michigan:
New Hampshire: Frog Peak Music. Michigan State University Press.
Doty, D. B. 1994. The Just Intonation Primer: An Intro- Locke, W., and D. Booth, eds. 1955. Machine Translation
duction to the Theory and Practice of Just Intonation. of Languages: Fourteen Essays. Cambridge, Massachu-
San Francisco, California: Just Intonation Network. setts: MIT Press.
Fokker, A. D. 1949. Just Intonation and the Combination Parrish, A., and J. S. Gourlay. 1987. Computer Format-
of Harmonic Diatonic Melodic Groups. The Hague: M. ting of Musical Simultaneities. Technical Report.
Nijhoff. Columbus, Ohio: Department of Computer and Infor-
Fonville, J. 1991. Ben Johnstons Extended Just Intona- mation Science, The Ohio State University.
tion: A Guide for Interpreters. Perspectives of New Partch, H. 1974. Genesis of a Music. New York: Da Capo
Music 29(2):106137. Press.

Stefik et al. 45
Raman, S., and N. Alwar. 1990. An AI-Based Approach Twining, T. 2002. Chrysalid Requiem. Brooklyn, New
to Machine Translation in Indian Languages. Commu- York: Cantaloupe Music. Audio compact disc,
nications of the ACM 33(5):521527. CA21007.
Stone, K. 1980. Music Notation in the Twentieth Cen- Whitney, P. 1998. The Psychology of Language. Boston,
tury. New York: Norton. Massachusetts: Houghton Mifflin.

46 Computer Music Journal

You might also like