The Live Coding Toolkit (LCT) is a suite of Pure Data abstractions (predefined functions) for musical live coding.
Being a real-time system, Pure Data lends its self to live coding practice, however, because it was not designed with live performance in mind, functions (objects) that assist live coding in Pd are limited, and thus the performing experience is not always a fluid one. The LCT is designed to automate some common algorithmic patterns used in live coding, facilitating a more elegant live coding experience.
The LCT is available for download from GitHub. To use, download the repository and add the folder to your Paths in Pure Data’s preferences. Most of the abstractions take optional arguments to set initial parameters, which can be updated via inlets as the patch is running. Pd is a ‘natural’ environment for musical live coding because it has powerful audio capabilities, runs in real-time, and is editable on the fly. However, it was never designed for live coding and so was absent some of the processes that are typically used in live coding performances. This library adds those, at least the ones I often rely upon.
I have been doing musical live coding performances since 2005 and until now these have been in text-based languages, in particular using Impromptu and XTLang (both developed by Andrew Sorensen). In recent years I’ve been increasingly using Pd for many algorithmic music projects and so it seemed natural to use it for live coding too.
There are a small set of abstractions in the LCT, they include process-based abstractions which are the critical design patterns for supporting live coding. There are support abstractions to assist with simple sound-making and wrappers for audio and MIDI output. The abstractions are:
- tempo : send bangs regularly at a particular BPM
- cycle : phrase looper
- periodic : stepped simple harmonic motion
- euclid : euclidean rhythm generator
- randchord : generate and store a randomised chord
- randseq : generate and store a randomised number sequence
- defer : schedule an event into the future by a number of beats
- stairs : stepped transition between two values
- ramp : smooth transition to the next value
- rand : linear, gaussian and random walk
- modrand : make a random selection at each modulo cycle
- direct : pass input values to a specified outlet
- quant : pitch class quanitze
- trans : transpose a number or list of numbers
- midi : MIDI note output and MIDI note and control change input
- map : scales data from one range to another
- gate : probabilistically let data through or not
- synth~ : simple mono subtractive synth
- polysynth~ : 8 voice version of synth~
- fm~ : simple 2-operator frequency modulation synth
- polyfm~ : 8 voice version of fm~
- drums~ : simple synthesized drum kit
- sample~ : load and playback a mono or stereo audio file
- polysample~ : 8 voice version of sample~
- echo~ : stereo audio feedback delay
- gate~ : probabilistically let audio through or not
- gain~ : stereo audio gain control with mute
- panner~ : stereo audio panning
- out~ : stereo audio output with level control and reverb
Below is a performance using the LCT and the Hydra graphics environment in March 2023 at the Queensland Conservatorium, Griffith University.
I introduced the LCT at the Hybrid Live Coding Interfaces 2021workshop. Below is a video of my presentation at that conference, starting at the 41 min mark.
Presentation of the LCT starts at the 41 min mark.
Functions in the LCT are based on live coding techniques outlined in Sorensen, Andrew & Brown, Andrew R. (2007) aa-cell in practice: An approach to musical live coding. In: Proceedings of the International Computer Music Conference. pp. 292–299. ICMA, Copenhagen.