Professional Documents
Culture Documents
REFERENCES
Linked references are available on JSTOR for this article:
https://www.jstor.org/stable/24265531?seq=1&cid=pdf-
reference#references_tab_contents
You may need to log in to JSTOR to access the linked references.
JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide
range of content in a trusted digital archive. We use information technology and tools to increase productivity and
facilitate new forms of scholarship. For more information about JSTOR, please contact support@jstor.org.
Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at
https://about.jstor.org/terms
The MIT Press is collaborating with JSTOR to digitize, preserve and extend access to Computer
Music Journal
Abstract: What does computation sound like, and how can computational processing be integrated into live-coding
practice along with code? This article gives insights into three years of artistic research and performance practice wit
Betablocker, an imaginary central processing unit architecture, specifically designed and implemented for live-coding
purposes. It covers the themes of algorithmic composition, sound generation, genetic programming, and autonomous
coding in the light of self-manipulating code and artistic research practice.
Computation is odd. Seventy-five years since the to grasp it and try to gain understanding into what
first programmable computer, the Zuse Zl, we it looks like (McLean et al. 2010) as well as what it
continue to fail to fully grasp computational besounds like.
havior. This lack of understanding results in a In light of these considerations, we introduce
struggle to keep unseen ramifications of our deBetablocker, our contribution to the field of artistic
cisions under control. Faced with such a strangeunderstanding of low-level computation (Howse and
Kemp 2006; Lehtomaen 2011), a field that research
and yet essential beast, the only sane strategy is to
try to tame it. The field of software engineering isinto digital sound synthesis discovered as early
littered with concepts such as regression testing, as in the 1970s (Berg 2009) and has been continually
type checking, white rooms, sandboxing, contracts,
investigated, for instance, by implementations of
and encapsulation—all attempts to cope with the
instruction synthesis in SuperCollider (Collins
fact that we fail to successfully understand how a 2008). Betablocker intersects live-coding practice
mundane machine of sufficient complexity will act and brings to light many different strategies for
when it is programmed by a human. presenting computation as tangible material—
Live coders look this beast straight in the eye.by making computational processing as much a
When live coding performers take to the stage andpart of live coding as the code that describes it,
project their screens, they invite us to join them a field investigated, e.g., in ixi lang (Magnusson
in attempting to understand this intricate dance2011) and Fredrik Olofsson's Arduino live coding
between human and machine (Collins 2011). Be (www.fredrikolofsson.com/fOblog/index.php?q=
yond performance practice, live coding is a broad node/590). Built around this element are a variety of
applications for testing, exploring, and performing
field that can be viewed from many different angles.
From rehearsed public performances, collaborativeboth scientific and artistic investigations.
improvisations, and individual sound explorations This article collects experiences, challenges,
to its utilization as a method in science, live coding
and insights gathered by the two authors over the
has been used in manifold applications. All these course of three years, while we designed imaginary
variations of the original theme share elements ofcentral processing unit (CPU) architectures and
live coding as they are featured in the TOPLAP man investigated the combination of both established
ifesto draft (www.toplap.org/wiki/ManifestoDraft, and emerging live coding techniques. Central to
see also Ward et al. 2004). Live coding attempts tothe work presented here is the use of live coding,
treat computation as a material on its own terms, performance contexts, and exploration strategies
in order to gain a better understanding of behavior
emerging from simple instruction sets when given
Computer Music Journal, 38:1, pp. 40-53, Spring 2014 self-modification abilities. This leads us towards a
doi: 10.1162/CC)MJ_a_00228
© 2014 Massachusetts Institute of Technology. kind of second-order live coding where, beginning
Instruction Set
ORG Set address start POPI Pop stack byte to address NOT Bitwise NOTs the top
o 0x01 'beginning of program).
m n nQ at location specified by
uxua argument (indirect). 0x11 stackbvte
EQU Push 1 if top two stack ADD Pops the top 2 stack ROR Bitwise rotates the top
❖
CZZ)
cud n items are equal, 0
uxuz otherwise. Pops 2.
n n items, adds them
uxud and pushes the result. o r. 1 -j stack byte by bits specified
uxi*: by the argument (right).
JMP Jump program counter SUB Pops the top 2 stack ROL Bitwise rotates the top
r>Yn-3 to location specified by
uxud the argument.
(—>
n nh items, subtracts them
uxud ancj pUShes the result. 0 C I o stack byte by bits specified
uxu by the argument (left).
1i
JMPZ Jumps if top of stack is INC Increments the top stack PIP Increments byte specified
0x04 zero' Pops 1 item' <x> 0x0c bytebyone' 0x14 by argument.
P5HL Push argument on to DEC Decrements the top stack PDP Decrements byte specified
oo 0x15 by argument.
0x05 stack 'Push literal). OxOd bytebyone'
PSH Push byte at address AN D Pops the top 2 stack o DUP Pushes a duplicate of the top
0x06 9iven by the argument. o n n items, ANDs them
uxue and pushes the result. o 0x16 stackbvte
□
OR Pops the top 2 stack NOTE Pops the stack and plays the
§
PSHI Push byte pointed to by
n n7 byte at address given by Oynf 'tems, 0Rs them 01 7 current sample at a frequency
uxu/ argument (indirect). uxur and pushes the result. UXA ' specified by the byte.
POP Pop stack byte to address XOR Pops the top 2 stack VOX Pops the stack and uses the
0x08 given by argument. nvin items, XORs them
ux±u and pushes the result 0 DvlH byte to choose the sample to
uxl° play at the current frequency.
to gain memory footprint over each other—was of the technique were also worth pursuing in their
also an important inspiration, both in terms of own right, leading to its later use as a sound
domain-specific low-level languages, and in terms generation engine, as embedded hardware, and as
of imaginary hardware. robotics.
From a musical point of view, Betablocker can
be viewed as a tool for algorithmic composition
(Maurer 1999) and simultaneous sonification and Live-Coding Philosophy and Aesthetic Findings
visualization of process. It is also inspired by
nonlinear and stochastic synthesis techniques as Betablocker is distinct from other approaches to
described by Xenakis (Xenakis 1971; Luque 2009). computational machines in several aspects. In the
Betablocker's development was driven by a need design of Betablocker, the ability to observe com
to escape certain programming conventions in live putational behavior was an essential goal, whereas
coding performances—for example, by removing the result of the computation (and therefore process
the reliance on the combination of keyboard and optimization) played a minor role. Furthermore,
mouse. An unintended side effect was the ability Betablocker is implemented as a software emulation
to remove the laptop entirely from focus—with and can be modified easily. This allows alteration
a long, universal serial bus (USB) cable, at times regarding introspection (by adding probes) and cus
we could join the audience with the gamepad tomization (by altering the instruction set). Last
and use the projection screen for live coding. The but not least, compared with common micropro
language and concept of byte-code level visualization cessor architectures such as the x86 (Alpert and
and icon-based assembler programming was initially Avnon 1993) or even reduced instruction set com
motivated primarily by these considerations. Later, puting (RISC) microcontrollers (Kane 1988) such as
after moving to dedicated game hardware, it became the Atmel AVR, Betablocker's architecture is kept
more obvious that the musical and artistic scope minimal. Operational complexity arises from the
-| "o^Jpd
°EW[2?Hg??ra0i@00
1
t_t (TiTeeTeeleeTTsleeTTaleelogl^
Figure 3
address" which results in the program playing a part
16byte arpeggiator of memory as a sequence. We can control the start
Note thread Reset thread
address location with the reset byte, write directly
to this part of memory, or modify the other thread's
speed to further increase the complexity.
t I Other types of programs alter the memory rather
than focusing on sound production. For example,
Figure 4 given two addresses, a program may increment one
and decrement the other, copying bytes from the
at the same time to provide more complexity. Values source to the destination,- this results in a reversal of
interpreted as pointers are visualized as arrows. the entire CPU memory. Another type of program is
In Betablocker/Rhythm the beat is always locked a self-replicating fork bomb, which copies its code to
to the instruction cycle, therefore faster melodies other locations so gradually more and more threads
or beats are a matter of optimization. A fast inner run the replication code.
loop program can be used for playing sounds
while another slower program modifies the first by
Use of Genetic Algorithms as Creative
overwriting parts of it while it is running, as in the
Augmentation in Live Coding
"XOR rave" (see Figure 3).
The next two programs (see Figures 4 and 5) are The same features that makes the Betablocker ap
both 16 bytes long, and require three concurrent proach suitable for exploratory artistic and musical
threads to be running over different parts of the applications (lack of error states and isomorphism
program. In both figures, working from left to right, between code and data) also make it a highly conve
the first thread loads an immediate byte and plays nient environment for using evolutionary strategies.
it as a sound repeatedly, the second one increments The use of genetic algorithms (Barricelli 1963) in
the byte that the first is loading, and the third this case is different from their traditional use. In
periodically resets the byte to a constant value. the case of Betablocker/Rhythm the desire to use
The example in Figure 4 simply plays the byte genetic algorithms arose from the need to discover
as a note—resulting in an arpeggiator-style melody. and learn new, optimal coding patterns for use in
After writing the code, the performer can change the live coding performances, as a way of escaping the
speed of each of the three threads to get more variety. feeling of being "stuck in a creative rut." The use
For example, the slower the resetting thread runs, of genetic algorithms in this case is to provide new
the longer the pattern will evolve before it repeats. ideas for musical use—in contrast to final programs
The example in Figure 5 is very similar, but it for their own sake.
is slightly modified to play a sequence of different According to the cognitive dimensions of nota
sounds rather than notes, in order to become a tions (Green 1989), viscosity is an important metric
percussion sequencer. The second instruction is of success—how malleable a notation is without re
changed from a "push literal" to a "push contents of quiring repetition of actions and without knock-on
(defn freq [1 n]
(defn _ [c]
(cond
(>= (+ c n) (count 1)) 0
(= (nth 1 c) (nth 1 (+ c n) ) ) (+ 1 (_ (+ c 1) ) )
:else (_ (+ c 1))))
(_ 0) )
Figure 6
Figure 7
population. In this application we are creating lists 235 248 12 8 score poorly for r
of note numbers, and, in order to create a fitness but extremely highly for uniquen
metric, we favor patterns that have unique notesthis (to surprising local maximum w
avoid repetition) but also look for a rhythmic nature the rhythmic fitness criteria, wh
by measuring them with the function defined in must have had an early influen
Figure 6. It detects repeating values spaced apart populations.
by
npositions, so that (freq ' (100 1 2 3 100 4 5 The evolved programs provided
6 100 7 8 9 100) 4) returns 3, as it finds three used in subsequent live coding
pairs of equal values (100) at the distance specified including self-playing programs l
(four positions apart). greater use of the stack (evolved
With the fitness function defined in Figure 7 less reliance on storing values o
we favor rhythmic components of four or six beats to robuster programs), and—more
and boost the uniqueness score by multiplying it general reappraisal of the potentia
by 50. Figure 8 is a resulting program that has possible with this restricted instr
evolved after several thousand generations. The Following this work, Betablock
program efficiently creates a complex pattern in Spork Factory to the ATtiny85 pr
four different ways: (1) a descending scale using an ongoing investigation of phy
x = { // DetaBlockerBuf example
var signal = Demand.ar (
Impulse.ar('bbRate'.kr(22100)),
' reset' .tr(0) ,
DetaBlockerBuf('heapBuf' .kr ( 0))
);
LeakDC.ar(signal) ;
}-play;
x = { // BBlockerBuf example
var pC, stack;
#pC ... stack = BBlockerBuf.ar('bbRate'.kr(22100),
'heapBuf' .kr(0) , 'startpoint' .kr(0));
stack = LeakDC.ar(stack) ;
// use information on program counter to place sound output
Splay.ar(stack, spread: 0.1, center: pC) ;
}-play;
JMP,
is known), because of its complexity 1], and and—as
a valid a pulse wave can be implemented
it turns out—fruitful approach is with
to[ORG,
work [NOP, . . . , NOP] , NOT, JMP, 1]
with
randomness and empirical observations
(here the
rather
ellipsis indicates
than an arbitrary string of
additional
with other analytical approaches. To NOPs). The
investigate number of NOP operations
this,
we implemented a cluster generatordetermines the pulse width. Similar to the sawtooth
for synthesizing
Betablocker operations of randomlyexample,
generated
the valuesheaps
of the remaining bytes in the
(see Figure 10). heap do not affect the program execution.
We developedthat
After extensive listening, we discovered all the example codes for classic
the heaps often sound like airily high-pitched
waveforms by exploratory live coding using the
helper class
and infinitely sustained sound clouds, BBlockerProgram,
broken up which implements
(among
occasionally by a rhythmical pattern. other functionality)
Typically, the play and plot methods
clouds settle either to a constant pitch
to, respectively,
or to silence
play and display a given Betablocker
after about 0.1 sec. In the long runheap. (after
An overviewaboutof the rendered signals is shown
in Figure
4 minutes), such clusters settle into 11.
a local stability
with fewer high frequencies than at While
the investigating
beginning. possibilities of implement
The first 1,000 computation steps ing a sawtooth
could wave with adjustable
therefore be slope, we
camevariation
called transients, and the long-term across a more complex
can be structure that resem
considered a timbral decay. bles such a sawtooth combined with a pulse: [ORG,
PSHL, 6, ADD, JMP, 1, <slope>]. Here, the
decision to add a probe to the stack rather than
Lessons Learned from Manually Programming
to implement additional side-effect instructions
Sonic Structures
came into play: The pulse wave in the program's
output (i.e., the stack's top value) is caused by an
When interacting with a low-level computational
operation that seems necessary to implement the
system, it is crucial to understand its inner structure
and get an idea of how it operates. It is possibleadjustable
to slope with a given data item. The shape
gain such knowledge by manually programming of the waveform is therefore limited due to the way
the sound signal is derived from the Betablocker
(simple) algorithms in the system's native language
and observing the resulting behavior. In order engine,
to namely, probing the items on one of its
functional parts. Note that the slot in which the
understand the specifics regarding the sonic charac
slope parameter is stored will never be reached by
teristics of the Betablocker engine, we hand-crafted
algorithms using the SuperCollider implementation the program counter and can therefore be used as
to render given waveforms as closely as possible. "safe" data storage for the slope parameter.
We found that a sawtooth wave can be modeled Another finding of the exploration of support for
live coding with Betablocker, one which links the
by setting the initial four bytes of the heap to [ORG,
INC, JMP, 1], When computation starts withresults of the oscillator exploration described in the
pC = 0, the remaining 252 bytes can be set arbi previous paragraph with explicitly written code, was
the sonic outcome of a combination of random data
trarily, as they will never be reached by the engine.
An impulse at nearly the Nyquist frequency can and a specifically designed algorithm that interprets
be rendered by executing the program [ORG, NOT, it. Given the program [NOP, ORG, NOP, NOP,
Figure 11
Figure 12
PSH, 24 5, PSH, -1, SUB, DUP, POP, -1, the parameter range in which the oscillators control
POP, l, JMP, l] followed by random numbers,
each other.
the topmost element in the stack varies As well as being
according to able to modulate its output
values addressed in previously pushed values. the
amplitude, Every
Betablocker/Audio implementation
in SuperCollider
set of input values then sounds different, though the can alter its calculation rate
sounds share a common "root note" on that depends
a per-cycle basis. This makes it possible to
add dynamics
on the execution rate. Note that the program not only in amplitude but also
itself
in pitch.
is part of the data and can be addressed, too. In several research-oriented sessions of
Because
live coding values
the point to which the stack pops its topmost we explored the sonic character of
assembling
depends on the machine's state, it might Betablocker engines according to the
also destroy
aforementioned
the original program, leading to unstable (yet maybe synthesis techniques.
refreshingly new) behavior. Figure 13 displays block diagrams for additive
To explore such variations in Supercollider, we
synthesis, frequency modulation, and amplitude
introduced the flag fillUpRandom to the helper
modulation, using two Betablocker/Audio modules.
class BBlockerProgram. When set, the heap's
Although the implementation of these synthesis
techniques
remaining slots are filled with uniformly was straightforward, the live coding
distributed
random values whenever a Betablocker engine is revealed several aspects worth
experimentation
mentioning.
initialized with the program given in Figure 12. In FM or AM synthesis, adjusting
the rate of the modulator to be below the audio
range results in sequencer-like monophonic synthe
sizer patterns that are mostly "pseudo-repetitive."
Classic Synthesis Techniques Adapted That is, they begin with a chaotic movement that
to Betablocker/Audio
is followed by repetitions of a (possibly) slowly
Classic signal synthesis techniques such as ad changing pattern. This behavior significantly ex
ditive synthesis, frequency modulation (FM), tends the sonic qualities of a Betablocker/Audio
and amplitude modulation (AM) combine sev engine, a feature the first author used extensively
eral sound-generating modules in order to create in his live coding performance at the SuperCol
new sounds. The result depends highly on factors lider symposium in London (see the following
like the ratios between the frequency components, section on Betablocker live-coding practice for
the signal characteristics of the base oscillators, and details).
Carrier
As is known from classic FM synthesis, modu Piksel open-source media-arts festival in Norway.
lation rates in the audio range result in a broader This was a 20-minute solo live coding performance
frequency spectrum. Linking the rates of all used using a gamepad as the only input mechanism.
Betablocker engines results in harmonic additions Ring-shaped menus activated by analog joysticks
to the (noisy) spectra. The sonic relation between were used to pick instructions and set data values,
different Betablocker programs seems to follow a and the directional gamepad buttons were used to
specific rule, but it does not seem to be a straight navigate memory and choose addresses. A 16 x
forward one. Another way to generate aesthetically 16 zoomable grid of the program and data was
interesting patterns with complex rhythmic interre projected and both sample and synthesis patches
lations can be achieved by letting both engines run were triggered. Despite the esoteric nature of the
on the same heap. assembly code, the audience feedback implied
To summarize, the application of classic syn that this was a particularly effective live-coding
thesis techniques allows for additional control and performance, due in large part to the inclusion of
variation of the sonic output and, depending on the the audio-synchronized movement of the process,
actual code on which the engines are running, may program counter, audio trigger animation, and
even give rise to musical structures. pointer visualizations—an early indication that
understanding these mechanisms is important to
an audience. Subsequently Betablocker was used
Betablocker and Live-Coding Performance in a series of performances in London, both solo
Practice (Griffiths) and in collaborative musical live sessions
as part of the group Slub (www.slub.org).
Over the course of the last three years, we used
Betablocker in a wide variety of live-coding sit
uations, including both public performances and 4for8, Aalto Media Lab, Helsinki (April 2011)
research-oriented investigations. The result of the
research process was reported in the previous sec After some time experimenting with Betablocker us
tion. We now describe relevant Betablocker-based
ing Fluxus, during 2010 the engine was ported to the
public performances in their order of occurrence.
Gameboy DS system via an unofficial, open source
"home brew" development tool. This gaming plat
form was chosen for its stylus input mechanism,
Piksel Festival Bergen (October 2006) sound coprocessor, and extremely fast dedicated
graphics hardware. The touch screen provided
improved input over the previous gamepad mech
The very first performance of Betablocker in the
Fluxus environment took place in 2006 at theanism, with new features such as drag-and-drop
ffc Supercollider File Edit Lang Ul Format Window Library Help LFSaw <2 O ^ « <D P » ^ Do. 21:05 - X Q
mainPerformer.scd NdefMixer_Ndef.allpocalhost']
Color.block.
Color.green(l, 0.5), reduce doc docSel opertKr Recon3
AOO NDefModular.rtf
)
}.sum.tonh;
Ndef(\stereoPorallei).ploy
Ndef(\stereoPorollei) stop
/els (C Ndef(\stereoPorollei)setn(\bufnum, q buffers osArroy scromble[0 3].collect(_.bufnum))
| Ndef{\stereoParollei).fadeTime = 2;
Ndef(\stereoParallel).xsetn(\bufnum, q buffers asArray scramble[8..3] collect(-.bufnum),
\bbRote, 18000)
Hdef(\stereoParollei) xset(\bbRate, 5000);
jrand(38))} NdefCui_stereoRatemodPlayer
emodPiayer ar2 CLR reset scope doc end fade 0.02
|
JpdateFreq 20 | NdefCui_stereoRatefeedbackPlayer
•ateBufnum i 6
IbackPlayer ar 2 CLR reset scope doc end fade 0 02 poll
S localhost server low Rate i i 1
I slop
•ua -occ/j > E hghRate in i 1000 —
Q.< k running .
low Rate | —11
teStartpomt i 0
A*gCPU 12J * * cpu Ma *
1 - hghRate [ | I 1000
UGont 469
bufnum i 14
Groups 10 starlpont 0
| . : bufnum | [ E3) o
startpotm | I0
| ¥) -13.1 Q
spread i |o.i j : spread m I 0.1
address lookup. This system, based around the performed on top of it. At the same time, we both
touch-screen interface, was first performed in prepared our performance setups.
Helsinki in 2011, using a Web camera to project the Bovermann's aesthetic goal for the performance
screen, stylus, and fingers of the live coder. This was to play polyrhythmic layers of colored, noisy
sounds, with a setup purely based around his Su
system and software is now used as a way of explain
percollider Betablocker implementation. At the
ing and demonstrating live coding, particularly to
same time, he aimed for a certain amount of trans
children, who tend to be familiar with the Gameboy
DS. parency, i.e., it should be possible to see not only
the changes he made to the code but also how
Betablocker engines alter the heaps' content. This
SuperCollider Symposium London: Live Coding meant (1) developing a visual representation of the
and Visuals (April 2012) heaps he was playing; (2) designing a textual helper
environment for his live coding, mainly provid
For the live coding performance at the ing text blocks; and (3) preselecting heaps that he
SuperCollider Symposium 2012, London, the two used as "raw materials" for his part of the perfor
authors performed together for the first time. Asmance.
we Figure 14 shows a screenshot of the setup
are not located at the same place, we developedused.
a
remote rehearsal routine in which each performer The improvisation with Bovermann allowed
Griffiths some freedom from the synchronized
prepared his part as a sound recording and the other
lockstep of his solo performances, and this concert Oulipop: Translation of Codes (May 2012,
was the first to experiment with independent April 2013)
speed settings for the different threads. Having
control over this meant greater breadth of possible This piece for two performers and one laptop was
higher-level patterns, and being able to speed up conceptualized and realized by Till Bovermann and
or slow down different parts while listening to Sara Hildebrand Marques Lopes (see Figure 15).
Bovermann's music provided greater control needed By manipulating texts according to rules from
in collaborative performance. the Ouvroir de literature potentielle (abbreviated
This performance using Betablocker DS was also Oulipo, cf. Mathews, Brotchie, and Queneau 2005),
the first to use a new synthesis engine written and, at the same time, sonifying the results with
specifically for the ARM7 sound streaming copro the help of a Betablocker system, it deals with the
cessor on the DS, parts of which were written in relation between writing and manipulating text,
hand-optimized assembly code, allowing for greater code, and sound.
sonic possibilities, such as subtractive and FM syn While the laptop performers are editing text in
thesis, as well as more experimental sonifications of one of two text panes, each keystroke also triggers a
the DS's tile graphics memory area. process that translates the current text's characters