SuperCollider and Pitch Class Sets

SuperCollider and Pitch Class Sets

How algorithmic composition tools change the way a composer thinks about pitch class sets — and what it means to use code as a compositional medium.

SuperCollider is a programming language for real-time audio synthesis and algorithmic composition. First released in 1996, it has become the standard tool in academic music technology for composers who think in code — who want to specify musical structures mathematically and let the computer realize them as sound, without the intermediary of a graphical interface or manual note entry.

For Bruce Arnold’s pitch class set work, SuperCollider serves two distinct roles: a composition tool (generating musical structures from pitch class set specifications) and a production tool (rendering those structures as the audio files that accompany the Sound Cells series). Understanding both roles illuminates what algorithmic composition actually is and what it is not.

SuperCollider’s Core Concept: Everything Is Code

In a conventional notation program like Finale or Sibelius, you enter notes by clicking on a staff. In SuperCollider, you enter notes by writing code that describes their pitch, duration, and amplitude — and the same code can generate one note or ten thousand notes, depending on the parameters you pass. The move from graphical to coded music entry is not just a change of interface; it changes what kinds of musical structures are easy to create.

For pitch class sets, this is transformative. The 026 trichord, for example, is defined by the interval array [0, 2, 6] from a root pitch. In SuperCollider, this becomes a variable — and transposing the trichord to all 12 pitch classes requires adding 12 numbers to that array and mapping the result to MIDI note numbers. A task that takes hours in a graphical program takes ten lines of code.

SuperCollider: 026 Trichord — All 12 Transpositions
// Define the 026 trichord intervals
var trichord_026 = [0, 2, 6];
var root = 60; // Middle C in MIDI

// Generate all 12 transpositions
var all_transpositions = (0..11).collect({ |transpose|
    trichord_026.collect({ |interval|
        (root + transpose + interval) % 12 + 60
    })
});

// Play each transposition in sequence
Pbind(
    
ote, Pseq(all_transpositions.flatten, 1),
    dur, 0.5
).play;

SuperCollider Concepts and Their Musical Equivalents

SuperCollider has a set of core programming concepts that map directly onto musical structures. Understanding this mapping reveals how algorithmic thinking and musical thinking converge when the right tool is used:

Array
[0, 2, 6]
A pitch class set — an ordered or unordered collection of intervals or pitch classes. The fundamental data structure of the trichord pair system.
Pseq (Pattern Sequence)
Pseq([60, 62, 66], 3)
A melodic pattern — play these notes in sequence, repeat n times. The building block of trichord exercises and études.
Pbind (Pattern Bind)
Pbind( ote, Pseq(…))
A complete voice — note events with pitch, duration, amplitude, instrument. One Pbind = one musical line.
Ppar (Parallel Patterns)
Ppar([voice1, voice2])
Two voices simultaneously — the harmonic combination of two trichords, or a melody over a drone.
collect / map
array.collect({|x| x + 5})
Transposition — add the same interval to every element of a pitch class set. The basic operation of moving a trichord to a new root.
% (modulo)
pitch % 12
Pitch class reduction — wrap any MIDI note number to its pitch class (0–11). The mathematical operation that makes the octave a cycle.

The Composition Workflow

For the Sound Cells computer realization recordings, the workflow from pitch class set specification to finished audio file follows a consistent pattern:

From Pitch Class Set to Audio — The SuperCollider Workflow
1Specify the trichord pair: Define the two trichord interval arrays and the key center (root pitch class). This is the entire harmonic content of the piece.
2Generate the hexatonic: Combine the two trichords at their specified transposition, sort by pitch class, verify no duplicates. This is the scale from which all melodic material is drawn.
3Specify the melodic architecture: Define the phrase structure — how many bars, what rhythmic patterns, whether phrases use both trichords or alternate between them, whether the A/B symmetrical difference structure applies.
4Synthesize and render: SuperCollider generates the audio in real time using sampled or synthesized instruments, with the drone sounding continuously underneath. The rendered audio is captured and exported as an MP3 or FLAC file.
5Review and adjust: Listen to the rendered audio, adjust phrase lengths, tempo, register, instrument balance. Iterate until the result captures the intended harmonic character of the trichord pair.

What Algorithmic Composition Is Not

A common misconception about algorithmic composition is that the computer is composing — that the human is merely specifying parameters and the machine makes the musical decisions. This is wrong, at least in the way SuperCollider is used in this work.

The human decisions are the decisions that matter: which trichord pair to use, what harmonic architecture to employ, what rhythmic character to give the phrases, what register to work in, what the relationship between the A and B sections should be. SuperCollider executes these decisions with perfect consistency and speed. It does not make them. The computer is a sophisticated instrument; the composer is still the composer.

What algorithmic composition does differently from conventional composition is make certain kinds of systematic completeness tractable. A human composer can write one piece using the 015-027 trichord pair. A human composer with SuperCollider can generate exercises for all 18 permutations of the 015-027 pair across all 12 keys — 216 exercises — in an afternoon. The creative decision (which trichord pair, which exercise format) is made once; the systematic elaboration is handled by code.

SuperCollider Realizations — 015-027

Both pieces are computer realizations generated with SuperCollider — the 015-027 trichord pair, an asymmetric combination of chromatic and quartal trichords that produces a distinctive lopsided quality.

Cast Iron — Bruce Arnold, computer realization (015-027)
Continuum — Bruce Arnold, computer realization (015-027)

Code and composition — the same thinking

Abstraction

SuperCollider’s arrays and patterns abstract musical structures the same way variables abstract mathematical quantities. Changing one value — the root pitch, the trichord intervals — changes the musical output systematically without touching the underlying architecture.

Iteration

collect(), map(), and loop constructs in SuperCollider mirror the mathematical operations of transposition and inversion on pitch class sets. The code makes explicit that these are the same operation applied repeatedly with different parameters.

Modular arithmetic

The % (modulo) operator in SuperCollider is the same modulo-12 arithmetic that underlies pitch class set theory. In code, the octave equivalence of pitch classes is not a convention but a literal mathematical operation on integers.

Separation of concerns

SuperCollider forces a clean separation between musical content (the pitch class arrays) and musical form (the synthesis architecture and pattern structure). This mirrors the set-theory separation between set content and interval structure — the same notes can be realized in infinitely many ways.

Code as a Musical Medium

The deepest contribution of tools like SuperCollider to music is not efficiency — it is clarity. Writing a pitch class set as an array forces precision: [0, 2, 6] is unambiguous in a way that “C, D, F#” is not (which octave? which voicing? which enharmonic spelling?). This precision, once internalized, changes the way a composer thinks about harmonic material — not as a collection of notes but as a mathematical object with specific interval properties.

The next article looks at the full production pipeline — how LilyPond scores, SuperCollider audio, and metadata combine into the finished books and courses that make up the Sound Cells series.

SuperCollider documentation and tutorials: supercollider.github.io. The Pattern system is documented in the SuperCollider help files under “Streams, Patterns and Events.” The Sound Cells series, produced using SuperCollider and LilyPond, is available at muse-eek.com.

Leave a Reply

Your email address will not be published. Required fields are marked *