Professional Documents
Culture Documents
Computer-music composition systems serve di- In these and other ways, most music representa-
verse purposes. Some draw on contrasting comput- tions allow music to be represented and manipu-
ing paradigms, including procedural, object-oriented, lated only within a prescribed range of preconceived
data-flow, functional, and logic programming. All musical ontologies. In contrast, AOMR has the dis-
such systems, provided they are sufficiently devel- tinctive aim of supporting whatever ontologies may
oped, are Turing-complete, but different paradigms be preferred by particular users. This is largely
can help facilitate different kinds approaches to mu- achieved by abstracting music constructs in terms
sic computing and new kinds of music manipulation. of discrete areas of interest, or concerns, that may
In general-purpose programming, there is a recent be composed together. In this way, AOMR attempts
development known as aspect-oriented programming to support any perspective as a first-class entity; its
(AOP) that has been claimed, along with related tech- operations, however, may crosscut or be scattered
niques,to offer new kinds of flexibility and ease of across existing organizational hierarchies.
variation. The system presented here, AspectMusic, In this article, we have focused on familiar and
is the first substantial work we are aware of to adapt relatively simple examples using Western tonal mu-
ideas from aspect-oriented programming and related sic to explain AOMR as clearly as possible. For clar-
techniques and explore how they might be applied ity, we proceed from the traditional dimensions of
to facilitate new approaches to musical exploration tonal music, and then we show how AOMR system-
and manipulation. AspectMusic is an implemented atically supports various operations and concep-
framework that applies ideas at the root of AOP to tions that crosscut these dimensions.
the manipulation of musical materials and struc- AOMR appears to be particularly relevant for
tures. To introduce AspectMusic,and more gener- those musical idioms in which musical composi-
ally, aspect-oriented music representation (AOMR), tion may be characterized in terms of a typically
we begin by reflecting on some various well-known limited set of musical raw materials that are
features of current computer-music systems. combined and reused in various ways, addressing
Interactive scoring systems effectively provide different musical areas of interest within a particu-
musical word-processor-style environments, lar piece of music. Well-known examples of such
enabling musical detail to be entered and edited on materials in Western tonal music include pitch se-
a note-by-note basis. Other approaches, such as quences, rhythmic figures, and harmonic progres-
JMusic and Common Music, attempt to provide a sions that may appear in exact and transformed
generalized music programming environment, al- forms throughout a musical work. Similar transfor-
beit with a prescribed musical ontology, embedded mational processes can occur at abstract levels in
within general-purpose programming languages. other idioms, with materials such as sequences of
Computer music environments such as Popes parameters that form the inputs to generative pro-
MODE system (Pope 1991) have evolved out of the cesses. Equally, AOMR is applicable to musical
requirement to support particular compositional works and fragments based on structural prototypes
needs, and therefore although multiple approaches that are formed through a finite set of combinatorial
are supported, ontological generality is not a prime operations. AOMR appears applicable wherever ex-
concern. plicit support for maintaining coherence across
representational or functional shifts is useful to a
Computer Music Journal, 31:4, pp. 4758, Winter 2007 composer.
2007 Massachusetts Institute of Technology. In traditional areas such as those idioms we focus
Hill et al. 47
Figure 1. (a) Tangled hier-
archical relationship of
pitch and rhythm; (b) poly-
archic pitch relationship.
Hill et al. 49
Figure 2. HyperMusic class
structure.
AspectMusic Overview
AspectMusic is an object-oriented, experimental <<OrderedCollection>>
implementation of an AOMR written in Visual- MusicUnitItem
MusicUnitItemCollection
ComposedMusicUnit
musical idea is generalized as an indexed collection pitch as, say, MIDI pitch values (0127), symbolic
of events relating to the same musical dimension, values such as C#4, or frequency values.
where each event may contain multiple elements Complete musical ideas are typically formed
organized into discrete voices. For example, a from multiple musical dimensions. A melody, for
monophonic rhythmic idea might be expressed as a example, can be viewed as being formed from pitch
sequence of events, where each event contains a and rhythm. In HyperMusic, MUs of different types
single object representing relative onset time and are aggregated into composed music units (CMUs),
duration. A sequence of chords, on the other hand, represented by the class ComposedMusicUnit, in
might be expressed as a sequence of events in which which each component MU is identified by the
each event contains pitch-value representations dis- name of the type it represents. To illustrate the
tributed across multiple voices. structure of CMUs, a simple musical fragment and
In HyperMusic, music units (MUs) represent dis- a schematic representation of the HyperMusic ob-
crete musical ideas in a single musical dimension, jects involved in a CMU representation of the frag-
organized as an ordered collection. Each element of ment are shown, respectively, in Figures 3 and 4.
the ordered collection within an MU contains an or-
dered collection (a MusicUnitItemCollection) of
MusicUnitItem objects that wrap user-defined Combining CMUs
objects representing musical information. The
MusicUnitItemCollection indexes its Music- CMUs are designed to be combined in various ways
UnitItems with values that correspond to discrete to form new CMUs that represent new musical
voices. Conceptually, the wrapped objects each per- material. We adopt the AOP term weaving to de-
tain to the same musical type, such as pitch, rhythm, scribe these combination processes. HyperMusic
or dynamic information. However, HyperMusic supports the musically fundamental notions of se-
does not prescribe the types that can be represented; quential and parallel weaving. However, it is easy
neither does HyperMusic mandate that all wrapped to extend the system to support other kinds of
objects within an MU are of the same class. For ex- weaving corresponding to any method through
ample, a pitch MU might contain MusicUnitItems which two CMUs can be combined, for example
that wrap a mixture of object types that represent weaving appoggiatura or acciaccatura (Honing 1993)
Hill et al. 51
configurations. It is important to note that CMUs code, generically termed transformations, to be
are not constrained to be complete. Although placed in the special MU type #Transform. Like
clearly for final realization, CMUs must contain all other types, the #Transform type is represented by
required musical elements in all required dimen- a MusicUnit structure, enabling ordering to be rep-
sions, at any intermediate stage a CMU can be in- resented. A common use might be to construct
complete in terms of the types that it contains CMUs that contain just one or more transforma-
(vertically) and the number of elements in each tions. However, as we will demonstrate later, the
type (horizontally). Because there is no implied cor- open-ended nature of the CMU structure means
respondence among arbitrary groupings within that the approach also naturally supports CMUs
each type, CMUs are able to support tangled inter- that contain both transformational code and other
dimensional relationships. musical information.
Hill et al. 53
Figure 5. CMUs A and B. Figure 6. CMU resulting Figure 7. CMU resulting Figure 8. CMU resulting
from the composition from the composition from the composition
D;C;A + D;C;B. @D;C;A. @(D;C;A) + D;C;B.
Figure 7
Figure 5
Figure 8
Themes;Theme1;Opening1
Asymmetric Composition of Musical Concerns
the regular expression Dim;Concern;Unit.* using AspectMusic
would be matched by all three CMUs. If the over-
rideByName relationship were used, then The HyperMusic approach to AOMR seeks to en-
Dim.Concern.Unit3 would be returned. If the able musical material, encapsulated as CMUs, to be
mergeByName relationship were used, then a CMU represented, organized, and woven together to form
formed by the sequential composition of Dim.Con- new material through declarative specifications.
cern.Unit1 + Dim.Concern.Unit2 + Although it is possible to realize CMUs as, for ex-
Dim.Concern.Unit3 would be returned. ample, MIDI sequences, the range of musical com-
positions that can be represented in this way is
naturally limited.
Composition History
MusicSpace provides an environment in which
An important feature of music is that musical ideas the events contained within CMUs can be arranged
evolve both inter- and intra-opus. The HyperMusic in time. In this respect, MusicSpace resembles a
approach enables evolution to be defined declara- typical MIDI sequencer. However the distinguish-
tively as hypermodule specifications that define the ing feature of MusicSpace is its ability to enable
weaving or transformation of existing CMUs to music to be modified in relation to context through
form new CMUs. As part of the composition of an approach that mirrors asymmetric aspects in
CMUs, each MusicUnitItem is annotated with a software. The chief advantages of this approach are,
composition history that provides an audit first, that modification processes that occur at mul-
trail of the various weavings and transformations tiple locations (and are therefore crosscutting) can
that have been performed and have caused the item be modularized, requiring them to be stated only
to be in its present location. once, and second, aspects are non-invasivethere is
no requirement to make any particular a priori
arrangements within a CMU for aspects to be ap-
Refactoring
plied to the content of that CMU.
Music composition is obviously a creative and gen- The MusicSpace approach enables compositional
erally iterative process. As such, decisions that are intent to be explicitly and declaratively expressed.
made at some point in the process might be modi- For example, consider Beethovens Sonata in C Mi-
fied at a later point. For example, a CMU might be nor No. 8, Op. 13 (Pathetique). At bars 57, there
constructed as a single rhythmic figure R. At some is a fragment in which the theme is played pp and
later point, it might be decided that R can be use- interspersed with ff interludes. We might suggest
fully considered as two components, R1 and R2, and that Beethovens structural plan was to have pp
Hill et al. 55
Figure 10. MusicSpace
structure.
sections followed by ff sections, irrespective of what Melody CMU1 CMU2 CMU3 CMU4
musical content these sections ended up contain- Bass CMUA CMUB CMUC
Hill et al. 57
An AspectMusic tutorial is available in the Hrsch, W., and C. Lopes. 1995. Separation of Con-
Open University Department of Computing Tech- cerns. Technical Report NU-CCS-95-03. Boston, Mas-
nical Report TR2006/12 (available online at sachusetts: College of Computer Science, Northeastern
computing-reports.open.ac.uk/index.php/2006/ University.
200612). Lerdahl, F., and R. Jackendoff. 1983. A Generative Theory
of Tonal Music. Cambridge, Massachusetts: MIT Press.
Lieberherr, K., D.-H. Lorenz, and M. Mezini. 1999. Pro-
gramming with Aspectual Components. Technical
References Report NU-CCS-99-01. Boston, Massachusetts: College
of Computer Science, Northeastern University.
Aussmann, S., and M. Haupt. 2003. AxonDynamic Loy, G., and C. Abbott. 1985. Programming Languages
AOP through Runtime Inspection and Monitoring. for Computer Music Synthesis, Performance, and Com-
Technical Report. Darmstadt, Germany: 2003 ASARTI position. ACM Computing Surveys 17(2):235265.
Workshop. Meyer, B. 1997. Object-Oriented Software Construction,
Belkin, A. 1999. A Practical Guide to Musical Composi- 2nd Edition. Upper Saddle River, New Jersey:Prentice-
tion. Available online at www.musique.umontreal.ca/ Hall.
personnel/Belkin/bk/. Mezini, M., and K. Ostermann. 2003. Conquering As-
Bockisch, C., M. Haupt, M. Mezini, and K. Ostermann. pects with Caesar. Proceedings of the 2nd Interna-
2004. Virtual Machine Support for Dynamic Join tional Conference on Aspect-Oriented Software
Points. Proceedings of the 3rd International Confer- Development. New York: Association for Computing
ence on Aspect-Oriented Software Development. New Machinery, pp. 9099.
York, New York: Association for Computing Machinery, Ossher, H., and P. Tarr. 1999. Multi-Dimensional Separa-
pp. 8392. tion of Concerns in Hyperspace. Technical Report RC
Cook, N. 1987. A Guide to Musical Analysis. London: 21452 (96717) 16APR99. Yorktown Heights, New York:
Oxford University Press. IBM T. J. Watson Research Center.
Crochemore, M., C. S. Iliopoulos, and Y. J. Pinzon. 2001. Parnas, D. L. 1972. On the Criteria to be used in Decom-
Computing Evolutionary Chains in Musical Se- posing Systems into Modules. Communications of
quences. The Electronic Journal of Combinatorics the ACM 15(12):10531058.
8(2). Available online at www.combinatorics.org/ Pope, S. T. 1991. Introduction to MODE: The Musical
Volume_8/v8i2toc.html. Object Development Environment. In S. T. Pope, ed.
Goldberg, A., and D. Robson. 1989. Smalltalk-80: The The Well-Tempered Object: Musical Applications of
Language. Boston, Massachusetts: Addison-Wesley. Object-Oriented Software Technology. Cambridge,
Gybels, K. 2001. Aspect-Oriented Programming using a Massachusetts: MIT Press, pp. 83106.
Logic Meta-Programming Language to Express Cross- Rumbaugh, J., et al. 1991. Object-Oriented Modeling and
Cutting Through a Dynamic Joinpoint Structure. Design. Upper Saddle River, New Jersey: Prentice-Hall.
Licentiate Dissertation, Vrije Universiteit Brussels. Schoenberg, A. 1967. Fundamentals of Music Composi-
Harrison, W., H. Ossher, and P. Tarr. 2002. Asymmetri- tion. London: Faber and Faber.
cally vs. Symmetrically Organized Paradigms for Soft- Sloboda, J. A. 1985. The Musical Mind: The Cognitive
ware Composition. Technical Report RC22685 Psychology of Music. London: Oxford University Press.
(W0212-147). Yorktown Heights, NY: IBM. Spiegel, L. 1988. Old-Fashioned Composing from the In-
Hill, P., S. Holland, and R. Laney. 2006. Symmetric side Out: On Sounding Un-Digital on the Composi-
Composition of Musical Concerns. Proceedings of the tional Level. Paper presented at the 8th Symposium
5th International Conference on Aspect-Oriented Pro- on Small Computers in the Arts, 25 November,
gramming (AOSD06). New York, New York: Associa- Philadelphia.
tion for Computing Machinery, pp. 226236. Tarr, P., and H. Ossher. 2000. Hyper/J User and Installa-
Hirschfeld, R. 2002. Aspect-Oriented Programming tion Manual. Technical Report. Yorktown Heights,
with AspectS. Technical Report. Munich, Germany: NY: IBM.
DoCoMo Communications Laboratories Europe. Xerox. 2002. The AspectJ Programming Guide. Technical
Honing, H. 1993. Issues in the Representation of Time Report. Stamford, Conneticut: Xerox Corporation.
and Structure in Music. Contemporary Music Review
9:221239.