An Approach To Musical Live Coding

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

QUT Digital Repository:

http://eprints.qut.edu.au/

This is the accepted version of the following conference paper:

Brown, Andrew R. & Sorensen, Andrew C. (2007) aa‐cell in practice :


an approach to musical live coding. In: Proceedings of the
International Computer Music Conference, 2007, Copenhagen.

© Copyright 2007 The Authors


Sorensen, A. and Brown, A. R. (2007). aa-cell in practice: an approach to musical live coding. Proceedings of the International
Computer Music Conference, Copenhagen. ICMA, pp. 292-299.

aa-cell IN PRACTICE:
AN APPROACH TO MUSICAL LIVE CODING
Andrew Sorensen Andrew R. Brown
MOSO Corporation Computational Arts Research Group
Brisbane, Australia Queensland University of Technology
andrew@moso.com.au Brisbane, Australia
a.brown@qut.edu.au

ABSTRACT to what Wang and Cook (2003) call on-the-fly-


programming, and McLean (2003) refers to as just-in-
Live coding performances provide a context with time programming. Most of these discussions have
particular demands and limitations for music making. In focused on the dynamic nature of live coding and how
this paper we discuss how as the live coding duo aa-cell various programming environments have been
we have responded to these challenges, and what this developed to facilitate live coding. They emphasise the
experience has revealed about the computational need for a highly interactive environment, the ability to
representation of music and approaches to interactive dynamically vary processes at runtime, and a strong
computer music performance. In particular we have concern for robust and flexible timing structures. In this
identified several effective and efficient processes that paper we will discuss how we exploit these and other
underpin our practice including probability, linearity, features of the Impromptu environment and leave
periodicity, set theory, and recursion and describe how detailed technical discussion about how this is achieved
these are applied and combined to build sophisticated to other previous (Sorensen 2005) and forthcoming
musical structures. In addition, we outline aspects of our papers.
performance practice that respond to the With regard to live coding practice some approaches
improvisational, collaborative and communicative and issues are discussed by Collins (2003) and Collins
requirements of musical live coding. and Olofsson (2006). Collins (2003) focuses especially
on the performer/audience relationship and aa-cell adopt
1. INTRODUCTION a similar stance to that suggested by Collins (after
For the past two years we have been performing as aa- McLean 2003) where code is projected and other
cell, a live coding duo, in regular concerts around measures are taken to engage the audience. The article
Australia. Our performances are semi-improvised by Collins and Olofsson is particularly concerned with
collaborations using the Impromptu environment, their audio visual live coding and the capture,
developed by Andrew Sorensen. segmenting and synchronizing of audio and visual
Live coding is a practice where software that material during performance. In aa-cell’s practice (so
generates music and/or visuals is written and far) there is no coding of visuals, however,
manipulated as part of the performance. It emphasises synchronisation is important to our collaboration even
the expressive possibilities afforded by programming though it is more directed and less agent-based than that
languages as a means for defining and manipulating discussed by Collins and Olofsson.
music and/or visual processes. Live coding of music is Looking further afield, aa-cell’s live coding practice
a-stylistic in principle, although as with all practice, a is informed by work in interactive music (Rowe 1993,
chosen medium leaves its imprint on output. In this Winkler 1998) and hyperimprovisation (Dean 2003)
paper we will explain how we manage the effect of with which it shares an interest in the role of the
medium and intent in our musical practice. computer in live performance. Our approach differs
Collaborative live coding places particular demands from this work not only in its “on the spot”
on the creative process because it requires a shared programming but also with regard to the role of the
vocabulary to facilitate directed musical exploration, computer. Our practice is less concerned with instilling
and in this paper we will outline the results of our the machine with musical “intelligence” to listen and
approach to working effectively within the constraints of respond, and is more akin to composition in real-time.
our practice in the hope that the techniques we have The literature on algorithmic composition is, therefore, a
developed (or accumulated) will inform other computer rich source of inspiration for our work (Hillier and
musicians and, perhaps more importantly, may highlight Isaacson 1958, Xenakis 1992, Berg 1996, Dodge and
issues regarding, a) the parsimonious computational Jerse 1997, Cope 2000, Taube 2004).
representations of music and, b) practical approaches to The approach of aa-cell to live coding combines
interactive computer music. composition and performance practices. This is in
contrast to the batch-compile process that Paul Lansky
2. BACKGROUND once referred to as “sort of improvising in real-slow
time” (Brown 2003). Rather, live coding for aa-cell is
Discussions of live coding as a practice have come to composition in real-time. However, it is not enough to
the fore in recent years (Collins, McLean, Rohrhuber, simply consider the compositional aspects of the
and Ward 2003, Blackwell and Collins 2005, Brown process. Live coding is a performance practice and we
2006, Nilsen 2007). The practice of live coding, must also control the algorithmically generated material.
building code structures during performance, is similar
Sorensen, A. and Brown, A. R. (2007). aa-cell in practice: an approach to musical live coding. Proceedings of the International
Computer Music Conference, Copenhagen. ICMA, pp. 292-299.

techniques are memorised, so the utility of a limited set


of processes across a variety of circumstances is
important.
Also of importance is modularity. In aa-cell’s live
coding practice performances are constructed by
building up complexity over time. In order to facilitate
this process, it has been necessary to have a set of
techniques that can be combined in a variety of ways to
form musical patterns at multiple levels of hierarchy. In
a sense, these form the atomic elements of our musical
construction.
Live coding practice requires that we become fluent
with these tools, so that we are free to concentrate on
Figure 1. The Impromptu development environment musical, rather than technical, expression. In a sense
these base processes have become the symbols of a new
Our approach revolves around setting up generative dynamic scoring environment based in code, to be
processes, and the dynamic nature of live coding allows manipulated symbolically as composers may manipulate
the performer to direct these process. Live programmers structures in more traditional common practice notation.
not only write the code used to generate the music, they Far from feeling restricted by simpler techniques,
also constantly change and modify the behavior of that we have been energised by this re-engagement with
code dynamically throughout the performance. In this elementary processes. These primary functions have re-
way the live programmer controls higher level structure, introduced an intimacy of process and a connection with
directing processes like a conductor directs an ensemble. medium; often lost in the higher level abstractions of
This is, for us, one of the most interesting aspects of more complex processes. This effect maybe due to a
our performance practice, the programmer is intimately forced return to a more restricted compositional tool-set,
involved in not only defining the process (as in standard a release from the tyranny of choice, or possibly due to
computer music programming practice) but also in our perception of a closer fundamental relationship to
controlling its execution and evolution. structure. Whatever the deeper reasoning, this
This focus on directing a real-time musical outcome parsimonious approach has resonated with us and has
through code has required us to seek out flexible resulted in a live-coding vocabulary centred around
computational control structures, and simple processes elementary notions of probability, linearity, periodicity,
that can be combined to yield rich musical results. In set theory, and recursion. We will briefly explore some
particular we have settled on probability, linearity, of these “atomic” processes and provide some practical
periodicity, set theory, and recursion as useful examples of their use in aa-cell’s practice.
techniques. While these techniques are not unique, we
have settled on them after exploration of numerous 3.1. Probability
approaches (Soresnsen 1998, Sorensen and Brown 2000, It is 50 years since Leonard Meyer wrote “Emotion and
Brown 2001, 2002, 2004, 2004a, 2005). We have found Meaning in Music,” a seminal work in the field of music
that by re-engaging with these techniques in a dynamic perception. In this work, Meyer contends that musical
performance context we achieve new levels of intimacy style is a system of sound relationships understood and
with these processes and with code as a medium of used commonly by a group of people. He describes
musical expression. these sound relationships as “complex systems of
probability relationships in which the meaning of any
3. MUSICAL COMPUTATIONS term or series of terms depends upon its relationships
The search for pattern and structure in music has with all other terms possible within the style
produced a large body of research from both the system” [??:pp??]. Computer music composers and
computer music community and the music theory theorists have made extensive use of probabilistic
community at large [Simon&Sumner 1968, Smoliar, techniques from the birth of computer music in the
Cope ???]. Generally this research has been focused on 1950’s [hillier & isaacson] through to the present
analysis, an identification of structure after the fact, and [Temperley & Huron]. We draw on this heritage to make
while this is an important approach (much maligned by extensive use of probabilistic techniques in our live
undergraduate music students) the structural coding practice.
descriptions can often be quite detailed, and live coding One approach that we have found extremely
requires succinct description. As well, many of the revealing is the “random” test. If we replace algorithm X
results of music analysis are contextually limited, with a random number generator, do we achieve any
whereas for live coding we need the power of fewer degradation in output and, if so, what scale of
generic methods wherever possible. degradation? What is the musicality of algorithm X
Overall, succinct representation has become a compared to noise? In our explorations to date we have
central tenant of our live coding practice. The found this to be an extremely revealing test. Our
limitations of how much typing can be done during a experience suggests that many algorithms, especially
live performance mandate parsimonious solutions for those not derived from music analysis, do poorly in this
both musical and systems design considerations. As well test. Often we have found that the mapping of data to
the improvisational nature of the practice demands that
Sorensen, A. and Brown, A. R. (2007). aa-cell in practice: an approach to musical live coding. Proceedings of the International
Computer Music Conference, Copenhagen. ICMA, pp. 292-299.

parameters is more musically significant than the data modulus values it is possible to loop subsections of the
being consumed. envelope as a method of motivic development.
As a result we have found that simple probabilistic
functions, in particular linear and gaussian distributions, ;; simple pitch quantized envelope
can provide effective variety and interest. It is worth ;; with randomized rhythmic performance
(define melody
noting that our use of probability is often subtle and
(lambda (env pos)
usually highly constrained. Randomness provides two (play-note (now) zeb1
useful functions in our practice, 1) the function of non- (pc:quantize (floor (env (fmod pos 8)))
determinism for the provision of structural novelty and '(0 2 4 5 7 9 11))
variation and, 2) the less commonly discussed role of 80 3000)
abstraction, where it provides the most practical means (callback (+ (now) (random '(7500 5000)))
for abstracting away many of the details of performance 'melody env
nuance and human inaccuracy. We do not mean to (+ pos (random '(.25 .5))))))
suggest that a simple random selection is the best
computational mechanism for handling performance (melody (make-envelope (vector 0 60 3 72 5 79 8 60))
0)
parameters; only that when used subtly it can often
provide adequate variation, making it a useful tool for
live programming. Often aa-cell use pitch envelopes in conjunction
with a gaussian-random whose mean follows the
;; A Simple diatonic progression - 1st Order Markov envelope and whose standard-deviation is either fixed or
(define chords changed over time by an auxiliary envelope, with the
(lambda (degree) final result often quantised to a pitch class set.
(play-chord 60 80 3 Some of our other common applications of
(pc:diatonic 0 '^ degree) polynomial functions include using two curves for
*second*)
tendency masks, specifying upper and lower boundary
(callback (+ (now) *second*) 'chords
conditions [Berg ICMC 86] and for controlling synthesis
(random (cdr (assoc degree
'((i v7 iv ii)
parameters.
(ii v7)
(iv ii v7 i) 3.3. Periodic Functions and Modular Arithmetic
(v7 i))))))))
Another family of functions common to musicians are
the periodic functions. Periodicity is pervasive in music
The example above demonstrates how simple providing structure from micro foundations through to
probabilistic techniques can be used to succinctly realise macro forms [Citation??]. We have been exploiting
musical goals. A simple first order Markov model from periodic functions as a means for generating structure in
diatonic musical theory provides a simple process for all aspects of musical form - pitched, rhythmic,
harmonic progression. Most of the examples that follow structural and timbral. These functions have a range of
will also make use of probability. applications for the live coder, including metric
pulsation and pitch cell extraction as well as more
3.2. Linear and Higher Order Polynomials common usages such as low frequency oscillation for
In his book “Structural Functions in Music”, Wallace timbral (synthesis) variation. Like polynomial functions,
Berry outlines some of the relationships between linear periodic functions can provide subtle contours through
functions and musical structure. He discusses these to grandiose gestures and when combined with various
relationships in pitched, rhythmic and timbral material probabilistic tricks can produce engaging performance
at multiple perceptual levels [Berry 1976]. Linear results.
functions are generally applied to abstract One aspect of periodic structure that aa-cell
representations of features that are often based on regularly exploit is the “composer’s pulse” [Clynes
perceptual scales, even if the underlying physical 1984]. By mapping a cosine function to amplitude it is
properties are non-linear. For example, chromatic or possible to provide a metric pulse. Multiple levels of
diatonic pitch organisation can be linear even though metric information can be easily provided by mapping
pitch frequency relationships are not. aa-cell use linear multiple periodic functions simultaneously. Further,
functions extensively across all musical elements; pitch, Clynes showed that these same functions can be applied
duration, amplitude, timbre and so on. We also make use to other rhythmic elements such as note duration and
of higher order polynomials and splines. tempo. In fact our experience suggests that it is only
Linear functions are often applied via break point through interaction at multiple musical dimensions that
envelopes to provide temporal structure at many levels an engaging musical performance is obtained.
in an aa-cell performance, ranging from milliseconds One common aa-cell application is to use a cosine
(microstructure) to an entire work (macrostructure) in function on note amplitude to provide a metric pulse to a
duration [Xenakis 1992]. The code below demonstrates regular pattern, such as a hi-hat part. Modifying the
a simple looped pitch cell generated from an envelope. period of the oscillation probabilistically produces
Although this is a trivial example it does outline two subtle yet engaging syncopation in the rhythmic pattern.
important practical benefits that envelopes provide for Another, pitch based trick, is to use an oscillator for
outlining pitched material; (a) they naturally coordinate selecting drum samples, occasionally changing the
rhythmic and pitch variation and (b) by changing the oscillation rate in order to modify the drum pitch
pattern, while retaining a constant rhythmic pattern. As
Sorensen, A. and Brown, A. R. (2007). aa-cell in practice: an approach to musical live coding. Proceedings of the International
Computer Music Conference, Copenhagen. ICMA, pp. 292-299.

Figure 2. aa-cell in performance.

with most of aa-cell’s live coding techniques the interest sequences with high level structural control. The simple
in these simple structures comes from a combination of example below outlines the probabilistic, two octave
constant localized change and larger scale regularity. transposition of a musical *cell* within the bounds of
The example below uses an oscillator to choose drums *pcs*.
samples and amplitudes.
(define *cell* '(60 62 63)s)
;; a trivial drum machine (define *pcs* '(0 3 7 8 10))
(define drum-machine
(lambda (time p) ;; random two octave transposition of *cell*
;; period drum pattern changes each 4 beats ;; with random choice of mutation to *cell*
(play-note (now) kit (pc:transpose
(+ 50 (* 6 (* cos (* time p pi)))) (random -7 7)
(+ 60 (* 20 (* cos (* time p pi)))) (random (list *cell*
2000) (invert *cell*)
(case (fmod time 4.0) (retrograde *cell*)
((0 2.5) ;; kick (expand/contract *cell*
(play-note (now) kit *kick* 80 5000)) (* 5 (random)))))
((1 3) ;; snare *pcs*)
(play-note (now) kit *snare* 80 5000)))
(callback (+ (now) 11025) 'drum-machine 3.5. Recursion and Iteration
(+ time .25)
(if (= 0 (fmod time 4.0)) Recursion and iteration provide many opportunities for
(random '(2 3 4 5)) repetition, evolution, pattern programming, grammars,
p)))) and they are fundamental to notions of computational
time.
Modular arithmetic is another tool which aa-cell use Like almost anything we can conceive of, it is
to control the regular cycles common to musical possible to think of music as a collection of processes
structure. The example above demonstrates the use of arranged in some form of hierarchical structure that
modulus for locating the beat position within a 4/4 bar. unfolds through time. To a large extent it is the
arrangement of these processes that defines the
3.4. Set Theory (Pitch Class Sets) organisation of sound that we describe as music, as
Wallace Berry notes, “Musical structure may be said to
Set theory has become a standard tool in 20th Century be the punctuated shaping of time and space into lines of
music composition [Straus]. aa-cell make extensive use growth, decline and stasis hierarchically
of set theory for manipulating pitch space (tonal or ordered.” [Berry 1976 pp??].
otherwise) [lerdahl]. Pitch Class Sets (PCS) provide a Our live coding makes extensive use of Impromptu’s
simple yet powerful tool for manipulating musical ability to precisely schedule closures (a function and its
patterns. environment) for future invocation. The ability to
By applying common musical devices such as schedule functions self referentially was first discussed
inversion, expansion/contraction, retrograde and in 1984 by D. Collinge in reference to his Moxie system
transposition to a musical cell, or motif, and then [9]. Using this mechanism functions1 may continuously
filtering the output though a PCS quantisation process it re-schedule their own invocation. The ability for a
is possible to rapidly develop interesting musical

1 Impromptu also allows continuations to be scheduled providing functionality similar to a co-routine.


Sorensen, A. and Brown, A. R. (2007). aa-cell in practice: an approach to musical live coding. Proceedings of the International
Computer Music Conference, Copenhagen. ICMA, pp. 292-299.

function to call itself self referentially is the basis of 'melody


recursion. Impromptu supports scheduled recursions (range-limit (+ pitch (random -1 2))
60 72)
which move through time at a governed rate, we refer to
(random '(22050 44100)))))
these as “temporal recursions.” Impromptu uses the
callback2 function to provide this functionality.
;; start the temperal recursion
The asynchronous nature of Impromptu’s temporal (melody 60 44100)
recursion model results in a natural cooperative multi-
tasking whereby multiple temporally recursive What makes this such a valuable technique is its
processes operate in a quasi-concurrent manner. inherent just-in-time behavior, vital in live coding
Musically, this means that we can have numerous practice as it defers computation and facilitates complex
independent musical lines running in parallel. By interplay between concurrent processes.
retaining their arguments between invocations temporal
recursions can maintain their state. This provides an 3.5.3.Temporal graphs
intuitive and encapsulated mechanism for maintaining The third major advantage of temporal recursion is
change over time. the ability to modify a temporal recursion’s target
closure on-the-fly. This is a powerful technique that aa-
;; play a one octave chromatic scale from C4
(define scale
cell use to control higher level structure in live
(lambda (pitch) performance. By altering the “course” of a temporal
(play-note (now) synth pitch 80 8000) recursion—by modifying the target function of the
(if (< pitch 72) callback—it is possible to change a process’s direction
(callback (+ (now) 10000) 'scale in a trivial manner. At its simplest one can think of an
(+ pitch 1))))) example whereby two functions have an equal chance of
calling themselves, or their opposite, setting up a
;; start scale on middle C temporal recursion which moves, with a probabilistic
(scale 60)
weighting between two functions. There is, however, no
reason to limit the available paths to only two choices
We make extensive use of temporal recursion in our and more sophisticated decision mechanisms can be
practice, providing us with three primary advantages. used. This is somewhat analogous to Timed Petri Nets
3.5.1. On-the-fly modification of code [Haus & Sametti 1992] and can be used to implement
Markov processes, augmented transition networks or
The first advantage is the ability to redefine a other graph-like structures where functions operate as
temporally recursive process on-the-fly. Because the nodes with transitions to arcs defined by callback
scheduler will always invoke the most recent definition functions.
of any given function, aa-cell can modify the behavior
of a temporal recursion by simply redefining the ;; func-a always repeats 10 times
behavior of its target function. This is a simple and ;; then calls back to func-b
intuitive behavior inherent in Impromptu’s temporal (define func-a
recursion model and allows real-time programmers to (lambda (cnt)
build, extend and modify code on-the-fly. (print "in func a" cnt)
(callback (+ (now) 1000)
3.5.2. Constantly adjustable control rate (if (> cnt 9) 'func-b 'func-a)
(if (> cnt 9) 0 (+ cnt 1)))))
A second major advantage of temporal recursion is
the ability to change the rate of recursion. When a ;; func-b has a 50/50 chance
function schedules itself for future invocation it ;; of calling into func-a or func-b
specifies a delay time. This delay time can be adjusted at (define func-b
any stage, either through random variation, or some (lambda (cnt)
other deterministic process and, through this change, (print "in func b" cnt)
modify the rate of recursion. The most trivial application (callback (+ (now) 1000)
(random '(func-a func-b))
of this ability is to playback a series of notes where
cnt)))
arguments to the function provide new pitch and
duration information. The pitch and duration are used to ;; start temporal recursion
render a note, and then the duration is again used to ;; note that we can call func-b
specify the time of the next invocation of the function. ;; multiple times to start
Suitably modified arguments are retained for the next ;; multiple concurrent recursions
invocation. (func-b 0)

;; a chromatic one octave random walk The code example above demonstrates a simple
;; crotchet and quaver rhythm in samples
temporally recursive transition network. The network
(define melody
contains two nodes, the functions func-a and func-b,
(lambda (pitch duration)
(play-note (now) piano pitch 60 duration) each maintaining its transition conditions specified
(callback (+ (now) duration) within the callback function. In this example, func-a is

2 Impromptu’s callback is similar to Moxie’s cause function


Sorensen, A. and Brown, A. R. (2007). aa-cell in practice: an approach to musical live coding. Proceedings of the International
Computer Music Conference, Copenhagen. ICMA, pp. 292-299.

called and must call itself ten times before passing adequately reducing the time spent defining higher level
control (calling) to func-b, which then has a 50/50 formal structures, there is a severe physical limit to the
chance of calling itself or calling back into part-a. This amount of immediate change available in a text based
simple technique provides a useful mechanism for environment. To be clear, we are not suggesting that
building higher level musical structure on-the-fly. immediate change cannot be “programmed”, we do this
regularly, but as live programmers our ability to respond
4. PERFORMANCE PRACTICES immediately is limited by the time required to make and
evaluate source code changes.
In addition to the computational approaches inherent in
aa-cell’s practice, there are a number of performance 4.2.1.Editor tools
considerations that do not impact so much on the We ameliorate this situation, in part, by providing
musical result as on the effectiveness and presentation functionality in the text editing environment. For
of performances. example, Impromptu allows programmers to set up to
ten mark points. These marks can be set, moved to and
4.1. Code Expansion have their underlying expressions evaluated with key
One problem that all live programmers must deal with is bindings. This provides for rapid movement around the
how to physically type the required code within a text editing environment and allows programmers to
reasonable period of time; reasonable for both the evaluate text that maybe located outside of the current
audience but, probably more importantly, to assist the viewable text region or even in another text buffer.
performer to more rapidly realise ideas. 4.2.2.External controllers
In addition to parsimonious and efficient
algorithmic descriptions discussed in section three, an Text editing features only go so far in providing
obvious way to deal with this issue is to abstract away real-time programmers with the ability to effect
as much detail as possible into pre-built functions and immediate change. To augment, or provide better
libraries. This “preparation” is an important aspect of gestural control, we can also employ external control
live-coding and aa-cell regularly spend time working on surfaces with various dials, faders, buttons and so on.
library code. However, the downside with this approach Impromptu can communicate to these via MIDI or OSC
is that abstracting away the ideas restricts our ability to as required. We have developed code libraries to
change, modify and re-evaluate the code during the facilitate the direct assignment of external controllers to
performance. We spend a good deal of any given pre-bound global symbols. In practice this allows aa-
performance modifying and extending code structures, cell to trivially assign controller values to arbitrary code,
in fact a performance may well be based around the providing real-time gestural control at any point in our
constant manipulation of a single temporal recursion. code.
Given that code is our medium, and that abstracting
;; play a series of notes with random pitch
away code reduces our range of expression we have
;; bounded by the current value of
been using code expansion as a complementary ;; controller 1 and controller 2
technique to functional abstraction. Code expansion (define melody
allows aa-cell to program the essential elements of an (lambda ()
expression and abstract away the remaining details to a (play-note (now) piano
code template. The template generates code based on the (random ctrl1 ctrl2)
arguments supplied to the template. Once the generated 60 22050)
code is pasted into the environment we can interact with (callback (+ (now) 22050) 'melody)))
it as normal; executing, extending and running it as we
would any other code. Our code expansions cover a In particular we have found that control surfaces
basic set of regularly usage patterns including melodic, with motorised controllers allow two way
chordal and rhythmic structures. Code expansion communication between musician and computer.
provides aa-cell with an efficient mechanism for Manual control can update assigned values, and
customising common usage patterns and has proven programmatic variations can be reflected in automated
itself to be a huge benefit in performance as it allows us movement of the motorised controllers.
to concentrate on the essential details without having to It is worth emphasising that the interactive, real-
worry about writing boiler plate code. time influence exerted on the generative algorithms at
play is, we believe, central to our live coding practice.
4.2. Non-programmable control
4.3. Collaboration and Communication
While text programming languages can be an effective
medium for expressing processes and structures, their Like any performance practice, live coding requires
textual nature makes them less capable of handling rapid coordination between the performers and consideration
change. The issue of rapid change in live programming of how the audience relates to the performance practice.
is of continuing concern for live programmers. As
4.3.1. Collaboration
Fredrik Olofsson states, “I feel I’d have to rehearse a lot
more to be able to do abrupt form changes” [7]. In our The major consideration regarding collaboration
experience the problem may be more intractable than between performers in aa-cell relates to
this. While we have been able to find methods, such as synchronisation, timing and data sharing. At a global
code expansion and functional abstraction, for level this often includes tempo, metre, harmonic
Sorensen, A. and Brown, A. R. (2007). aa-cell in practice: an approach to musical live coding. Proceedings of the International
Computer Music Conference, Copenhagen. ICMA, pp. 292-299.

progressions and other structural features. Impromptu Critics of live coding have suggested that this makes
supports a number of mechanisms for communication the projection of the source code an unnecessary and
between remote hosts. intrusive endeavour. Our experience is that despite
In recent years Open Sound Control (OSC) has people’s inability to understand the detail of the code,
become a de-facto standard for musical communication they appreciate that the work is being built up as it
and provides a convenient mechanism for proceeds and seem to enjoy participating in identifying
communication between Impromptu hosts and a variety symbolic queues. To this end we make an effort to use
of other computer music tools supporting the OSC function and variable names that people will recognise
protocol. and that may assist in their interpretation of the code.
I m p ro m p t u a l s o o ff e r s a n I n t e r P r o c e s s Symbol names such as “outrageous-kick” and “grunge-
Communication (IPC) mechanism for communication it-up” never fail to communicate our intent! Regardless
directly between remote processes. This provides a of the audiences’s level of understanding, code
powerful mechanism for sharing and executing code projection highlights to the audience that structures are
across remote Impromptu hosts. In practice this allows coded during the performance. This is particularly
aa-cell to share functions and global variables during a important at this early stage in the development of live
performance. More specifically the IPC mechanism coding as a musical practice.
allows us to define functions and variables in each To further enhance the appreciation that live coding
other’s Scheme interpreter. Unfortunately this powerful builds structure on the fly we always start our
feature is limited without the ability to view and edit the performances with a blank text editor. We feel that the
associated source code. growing complexity of the typed code paralleled by the
In order to resolve this issue, aa-cell anticipate the increasing complexity of the sonic outcome helps to
future addition of a collaborative text editing articulate the building process to the audience. In
environment to the Impromptu IDE3 . This would addition, the Impromptu environment has text
provide live programmers with the ability to work highlighting features that not only assist the
collaboratively on a single source code file programmer, but the audience to see where the
simultaneously. We anticipate this to be a significant programmer’s attention (cursor) is positioned and to
addition that would allow live programmers to work indicate when functions are evaluated.
together in a more substantially collaborative
environment. However, that said, aa-cell also enjoy 5. CONCLUSION
exploring the separation of environments.
Impromptu’s precise timing and interactive In this paper we have outlined the theoretical and
environment encourages users to “perform.” By this, we practical aspects that are significant in our live coding
mean that aa-cell often work without the safety net of practice as aa-cell. The paper has focused particularly
networked time codes, shared harmonic structures etc. on processes related to musical structure and event level
and instead concentrate on performing our individual considerations and discusses some of the techniques that
environments by manually timing the execution of code, aa-cell have found useful for defining musical processes
manually adjusting tempo and metre, and interacting in in a live coding performance.
a constant dialogue of harmonic and timbral change We are certainly not the first people to discuss the
within a vocabulary of shared musical queues. No doubt usefulness of simple mathematical functions for
our continued exploration of live coding practice will modeling musical behaviors and it is perhaps
continue to oscillate between fixed and freer forms of unsurprising that aa-cell would find these functions
coordination. useful in our practice. What has been a surprise to us,
however, is just how much utility a small set of
4.3.2. Audience Communication processes have provided. It is possible that our success
with these simple functions is due to our manual control
In order to enhance the audience appreciation of aa-
of higher level structure through our manipulation of
cell performances we have adopted a number of
running process, but it may also point to a more
performance conventions. As has become standard in
profound revelation about parsimonious computational
live coding practice we project the computer displays so
representations of music and improvisational
that the audience can see the code being typed. We try to
performance. We hope to expand more on these ideas in
make the code as legible as possible.
the future.
However, even with a strongly technical audience,
Many of the performance aspects of live coding
complete comprehension of the generative ramifications
practice are still being hotly debated and aa-cell are still
of the source code being run during a performance is
actively considering the pros and cons of various
challenging. Knowledge of the programming language,
performance related issues. However, we feel confident
the environment, the algorithms used, musical, sonic
that as the practice matures, and audiences become more
and more general cultural knowledge, even knowledge
familiar with this new practice, these issues will resolve
of individual performers’ practice are all necessary for a
themselves. In the meantime we are busying ourselves
complete mapping of the projected code to the musical
with music making.
outcome. Consequently, most audiences will struggle to
This article has provided several brief, and
fully realise the connections between the code and any
necessarily trivial code examples. We have provided a
generated material.
web page http://impromptu.moso.com.au/icmc-

3 For a good example of collaborative text editing see the SubEthaEdit text editor http://www.codingmonkeys.de/subethaedit/
Sorensen, A. and Brown, A. R. (2007). aa-cell in practice: an approach to musical live coding. Proceedings of the International
Computer Music Conference, Copenhagen. ICMA, pp. 292-299.

examples.html with supplementary material relating to Computer Music Conference. San Francisco:
this paper, including expanded code examples and ICMA
related audio recordings. We hope this will provide [12] Click Nilson (Forthcoming 2007) Live Coding
more compelling documentation for the interested Practice In Proceedings of the New Interfaces
reader. Screen casts of complete live coding for Musical Expression Conference 2007.
performances can also be found on the Impromptu
website. [13] Collinge, D. J. (1984) MOXIE: A Language for
Computer Music Performance. In Proceedings
6. REFERENCES of the 1984 International Computer Music
Conference. San Francisco: Computer Music
[1] Berg, P. 1996. Abstracting the Future: The Association
search for musical constructs. Computer Music
Journal 20(3): 24-27. [14] Collins, N., McLean, A., Rohrhuber, J. and
Ward, A. 2003. Live Coding in Laptop
[2] Berry, W. 1976 “Structural Functions in Music” Performance. Organised Sound 8(3): 321-330.
General Publishing Company Limited
Toronto,Ontario. 1987 Publishing by Dover [15] Collins, N. 2003. Generative Music and Laptop
Mineola, NY. Performance. Contemporary Music Review.
22(4): 67-79.
[3] Blackwell, A. and Collins, N. (2005). The
Programming Language as a Musical [16] Collins, N. and Olofsson, F. 2006. klipp av:
Instrument. In P. Romero, J. Good, E. Acosta Live Algorithmic Splicing and Audiovisual
Chaparro and S. Bryant (eds.) Proceedings of Event Capture. Computer Music Journal. 30(2):
the 17th Workshop of the Psychology of 8-18.
P ro g r a m m i n g I n t e re s t G ro u p . S u s s e x [17] Cope, D. (2000). The Algorithmic Composer.
University, pp. 120-130. Madison: A-R Editions.
[4] Brown, A. R., Towsey, M., Wright, S. and [18] Dean, R. (2003). Hyperimprovisation:
Diederich, J. (2001). Statistical analysis of the Computer-Interactive Sound Improvisation.
features of diatonic music using jMusic Middleton: A-R Editions.
software. Proceedings of the Computing Arts
2001: Digital Resources for Research in the [19] Desain, P. & Honing, H. (1993). Tempo curves
Humanities. Sydney, pp. considered harmful∗. In Time in contemporary
musical thought J.D.Kramer(ed.),
[5] Brown, A. R. (2002). Opportunities for Contemporary Music Review. 7(2). 123-138.
Evolutionary Music Composition. In P. Pre-printed in: Desain, P. & Honing, H. (1992).
Doornbusch (ed.) Proceedings of the Music, Mind and Machine. Studies in Computer
Australasian Computer Music Conference. Music, Music Cognition and Artificial
Melbourne: ACMA, pp. 27-34. Intelligence.Amsterdam: Thesis Publishers.
[6] Brown, A. R. (2004). Playing with Dynamic [20] Dodge, C. and Jerse, T. A. (1997). Computer
Sound. In E. Edmonds and R. Gibson (eds.) Music. New York: Schirmer Books.
Proceedings of the Interaction: System,
Practice, Theory. Sydney: Creativity and [21] Haus & Sametti 1992 in “Computer Generated
Cognition Studios Press, pp. 435-450. Music” editor Denis Baggi. 1992 IEEE
Computer Society Press
[7] Brown, A. R. 2004. An aesthetic comparison of
rule-based and genetic algorithms for [22] Hiller, L. and Isaacson, L. 1992. Musical
generating melodies. Organised Sound 9(2): composition with a high-speed digital
191-198. computer. In Machine Models of Music, S. M.
Schwanauer and D. A. Levitt, Eds. MIT Press,
[8] Brown, A. R. (2005). Exploring Rhythmic Cambridge, MA, 9-21.
Automata. In F. e. a. Rothlauf (ed.) Proceedings [23] Huron, D. (2006). Sweet Anticipation: Music
of the Applications of Evolutionary Computing: and the Psychology of Expectation. Cambridge
EvoWorkshops 2005. Lausanne, Switzerland: MA: MIT Press.
Springer, pp. 551-556. [24] Lerdahl, F. (2001) Tonal Pitch Space. NY, NY:
[9] Brown, A. R. 2003. Music Composition and the Oxford University Press.
Computer: An examination of the work [25] Rowe, R. (1993). Interactive Music Systems:
practices of five experienced composers. PhD Machine listening and composing. Cambridge,
dissertation. Brisbane: The University of MA: MIT Press.
Queensland.
[26] Sorensen, A. and Brown, A. R. (2000).
[10] Brown, A. R. 2006. Code Jamming. M/C Introducing jMusic. In A. R. Brown and R.
Journal 9(6). http://journal.media- Wilding (eds.) Proceedings of the InterFACES:
culture.org.au/0612/03-brown.php The Australasian Computer Music Conference.
[11] Clynes, M. (1984) The secret life of music. In Brisbane: ACMA, pp. 68-76.
Proceedings of the 1984 International [27] Sorensen, A (2005). Impromptu: an interactive
programming environment for composition and
Sorensen, A. and Brown, A. R. (2007). aa-cell in practice: an approach to musical live coding. Proceedings of the International
Computer Music Conference, Copenhagen. ICMA, pp. 292-299.

p e r f o r m a n c e . I n P ro c e e d i n g s o f t h e
Australiasian Computer Music Conference,
2005.
[28] Sorensen, A. The Impromptu programming
environment: http://impromptu.moso.com.au
[29] Straus, J. N. (1989). Introduction to Post Tonal
Theory. Prentice Hall College Div.
[30] Taube, H. (2004). Notes from the Matalevel:
Introduction to Algorithmic Music Composition.
London: Taylor & Francis.
[31] Winkler, T. (1998). Composing Interactive
Music. Cambridge, MA: MIT Press.
[32] Wang, G. and Cook, P. R. (2003). ChucK: A
Concurrent, On-the-fly, Audio Programming
Language. Proceedings of the International
Computer Music Conference. ICMA, pp.
219-226.
[33] Xenakis, I. (1992). Formalized Music: Thought
and Mathematics in Music. Stuyvesant NY:
Pendragon Press.

You might also like