1 – Writing What You Want

The idea of programming : Papert, LOGO & the micro world  : tools for the composer past and present : 20C composers and parametric thinking : sketching and drafting with Michael Finnissy : creating a toccata for solo clarinet from a four-note motif : working with the Slonimsky Thesaurus ; John Adams and his Earbox software.

 We could say this is an e-book about composing masquerading as one of those self-help books ‘for dummies’. Composers are not dummies, far from it, but when it comes to aspects of technology, and especially the very idea of programming, a composer can easily can easily feel like a dummy!

So this is not a ‘learning how to compose book’, because composers know how to do this already. This text attempts to bring together existing techniques and ways of thinking about creating music with methods that have evolved through interaction and mediation with computer software. You’re half way there if you are an experienced composer, but perhaps you’d like to explore how interaction with a computer could possibly help you be more productive and its output nourish your imagination. You’d like to be able to investigate possibilities that in terms of calculation and representation might, any other way than using a computer, prove prohibitive.

By stealth the idea of programming will infiltrate this text. Programming, coding or scripting describes that, to some, mysterious activity that enables a composer to communicate with a computer system so that it can respond to a personal way of thinking and doing.

This notion has its seeds in the visionary writings of Seymour Papert of MIT who in the 1960s invented the computer language LOGO, a first language for children to develop ways of thinking about geometry, space, proportion, algebraic mathematics and function machines. His vision was, in essence, that people should be able to design and develop through the computer their personal ‘microworlds’, so their interaction with a computer reflected their needs and aspirations and not the mindset of professional software designers. Sadly, though the personal microworld remains a powerful idea, it became defused by a reliance on those de facto industry-standard tools such as the Microsoft Office. But there is another way: listen to composer Kim Cascone talk about building his own software tools for composition.

In music most of us use the common tools of computer software. These are predominantly focused on producing  a performance score or recording of an existing composition. These tools are really the musical equivalent of Microsoft’s Word, a software application that doesn’t help us invent the content of a letter or a poem. Word simply provides the virtual space to record our key taps. Certainly, there is the creative interaction of seeing words appear on the virtual page. Writers respond to this – and by seeing what we write we respond critically and imaginatively. In composing music , should we use software such as Sibelius or Logic X, we can respond in a similar way through seeing and hearing an emerging score, a score that has probably been previously composed or partially composed on paper or at the keyboard.

True, there are tools within the software that help us further, to a certain extent. Copy and Paste are invaluable, and most systems will have the kind of tools in a virtual form that Bach would have employed on paper as a matter of course – transposition, inversion, retrograde. Composers also develop ‘variants’ with selected deletion and erasure, or if they have some background in logical processes, and may use a Boolean editor. Curiously enough the latter, which is now commonly known in the programming of music as filtering can involve quite complex procedures in code.

But today we bring to the composing act a variety of other techniques that require an element of calculation, and these often come from outside the traditional domain of music. Think about interpolation, morphing, randomising. These processes that are commonplace in the visual arts, and are now becoming widely used in music composition. Many of these are the result of composers considering the elements of music parametrically, a form of musical thinking that began to become apparent in the post-war scores of Cage, Messiaen, Xenakis and Stockhausen, but had its origins in the 14C techniques of iso-rhythm and prolation.

Most of these processes require some kind of conversion mechanism. We have to make conversions from pitch or rhythm into integers before the mechanisms we see as holding potential for musical treatment can work. With integers we can use mathematical calculations; we can employ algorithms. This is precisely where computation outpaces pencil and paper, because it can do such complex conversions and mathematical calculations instantly.

Sketching or drafting is something most creative people do. Composers are either highly organised or just plain messy. Michael Finnissy says that he’s obsessive about drafting ideas using up any piece of rough paper he happens to have about (see the image below). The anthropologist (and cellist) Tim Ingold likes to cut up empty cereal packets to create small squares to put thoughts into work. He then pins these cards to a notice board. One aspect of this messiness derives from the speed at which an idea can happen, and to take root has to be written down in some way.

finiscoreA draft page by Michael Finnissy.

If I look at my own manuscripts some forms of shorthand are often present, but intelligible only to me! Recently, I’ve taken to accept that first ideas are less than easy to decipher, so I immediately write out  those  ‘difficult to read’ or shorthand passages in a different ink. When writing code it’s easy to devise an expression in an unusual, even perverse way, so that half an hour later its meaning or direction can be forgotten. So the immediate commenting of an expression of code becomes a valuable reminder. This is usually a brief text description, and even the best programmers do it.

Let’s imagine we’ve found a short motif using the single parameter of pitch, and we’d like to take this motif further, just as a discrete unit of musical information. There is something seductive about turning a very little into a lot! One of the classic motifs that responds to this treatment must be BACH (Bb A C B natural) beloved of Liszt, Shostakovich and others.

Let’s set it into a context: a toccata-like invention for solo clarinet. The toccata is a form that evolved in keyboard music of the 16C. It is usually a stream of  ‘touch’ (toccare, It) where rhythmic alteration is minimal; pitches flow unimpeded from beginning to end. So for our example the toccata enables us to avoid dealing at this time with the complexities of rhythm-change. It can be a stream of pitches as 1/16ths. Take a motif and using the functions of repetition and transposition as a kind of generative device, see if you can make your motif flow in a musical way.

Try this on paper or on a digital score writer – copy the motif, paste it x number of times. Transpose this motif up and down to begin to build a structure. This takes time, and it’s likely you’ll work sequentially, making one transposition decision at a time. But with programming you can work and reflect on your intention in a global way, simply by writing down a string of integers representing a transposition value. Now look at these expressions in code:

(setf motif ‘(bb4 a4 c5 b4))
; theme

(setf m-x12 (gen-repeat 12 (list motif)))
; 12 repeats of the theme

(setf  flow (pitch-transpose ‘(0 3 2 6 12 4 2 0 3 6 12) m-x12)
; A list of transpositions applied to the 12 repeats

1-1-scoreNow, let’s change the ordering of  each set of transposed notes so get a different and more complex / richer  effect:

(setf motif ‘(bb4 a4 c5 b4))

(setf m-x12 (rnd-order (gen-repeat 12 (list motif))) :seed 2)
; Each of the 12 repeats has their order randomised

(setf i-flow
(pitch-transpose ‘(0 3 2 6 12 4 2 0 3 2 6 12) m-x12))
; A list of 12 transpositions of the reordered repeats

If we randomise anything with computation the computer automatically consults its random generator, a valuable part of its operating system infrastructure. This means that without any further control each randomisation will produce a different result, or, as here, a different reordering. But to bring this under control we can set a seed value, here :seed 2, and so bring back the precise ordering as many times as we wish.


The code may look incomprehensible in detail, but it should nevertheless reveal something of the process. The motif should be obvious. Four pitches are presented as a list and ‘set’ to the variable name motif. The computer now knows motif is pitches (bb4 a4 c5 b4).

(setf motif ‘(bb4 a4 c5 b4)

(setf m-x12 (gen-repeat 12 (list motif)))
;  12 repeats of the theme

(setf m-rnd  (rnd-order m-x12 :seed 2))
;  Each of the 12 repeats has their order randomised

(setf i-flow
(pitch-transpose ‘(0 3 2 6 12 4 2 0 3 2 6 12) m-rnd))
;  A list of 12 transpositions of the reordered repeats

What’s important here is not so much the detail but the process.

  • make a list of pitches; repeat that list 12 times;
  • randomize the order those 12 motifs;
  • now transpose each motif following a list of transpose values.

This is just a tiny example of how we might think about the process.

And this is just the tip of a large iceberg of possibility. Is this thinking about the composing process in a new and different way? To see a real-life example of such a programme used to make a piece of music look and listen to Dreaming Aloud for guitar solo.

1-3-scoreThe example above isn’t a stream of pitches, but it is made in exactly the same fashion as the programme quoted above. There’s a four-note motif at its heart taken from Nicholas Slonimsky’s Thesaurus of Scales and Musical Patterns.

I’ve used the Slonimsky patterns as a resource and a starting point for many compositions. Its patterns often contain powerful tonal ambiguities! As such, their potential as a basis for improvising and composing can be compelling. John Coltrane is supposed to have learnt all 2000, and practised them daily. They have become a staple resource for many jazz musicians, which is why you can never find a copy in a public music library. It’s an expensive book, so it’s invariably been ‘borrowed’ permanently. That said, Schoenberg had nice things to say about it and many composers use it, most notable being John Adams.

Adams has written about his fascination with Slonimksy’s Thesaurus and  Nicholas Slonimsky himself, who he described as ‘a character of mind-boggling ability’, and for whom he even wrote an orchestral piece in his honour called Slonimsky’s Earbox. Anne McCuthan’s book The Muse that Sings  devotes a chapter to Adams who reveals some valuable insights into his composing process.

         ‘I have a little software module that I’ve created I call my Earbox. It has a large number of transposed scales and modes some of which I took straight from the Slonimsky Thesaurus, and others I made up myself. It exists permanently in my software system, so I can take any passage I’ve composed and multiply it by one of the modes in Earbox to create a different colour of emotional effect. I first employed Earbox in the Chamber Symphony (1992), and made extensive use of it in the Violin Concerto.’ – John Adams


Above is shown one of the most celebrated patterns from Slonimsky’s Thesaurus. I’ve coded the entire Slonimksy library into the composition system I use, and we’ll meet it again when we discuss using templates and libraries.

References, Links and Further Reading
John Adams: Slonimsky’s Earbox
Bayley & Clarke: Analytical Representations of Creative Process in Michael Finnissy’s Second String Quartet [pdf]
Kim Cascone: Building your own music software
Rich Cochrane: Beyond Slonimsky: Melodic Patterns for Guitar
Ann McCutchan: The Muse that Sings: Composers Speak about the Creative Process
Nigel Morgan: Composing with the Slonimsky Thesaurus
Nigel Morgan: Dreaming Aloud, for Solo Guitar

Leave a Reply