Karlheinz Essl

Portrait KHE


Real Time Composition Library

Software library for algorithmic composition in Max/MSP/Jitter
copyleft 1992-2014 by Karlheinz Essl and others

Now available:

RTC-lib 6.0 for Max

for Max5 and Max6.x
released: 31 January 2014

Max5 Max5



News   NEW
Release Notes (vs. 6.0)   NEW

History   NEW
RTC-lib for Windows
RTC-lib for Pd (Pure Data)
Own works realized by using the RTC-lib

RTC-lib Tutorial


Download download


This software library - a collection of patches and externals for Max/MSP (an interactive graphical programming environment for multimedia, music, and MIDI running on a Macintosh; © by IRCAM / Cycling74) - offers the possibility to experiment with a number of compositional techniques, such as serial procedures, permutations and controlled randomness. Most of these objects are geared towards straightforward processing of data. By using these specialized objects together in a patch, programming becomes much more clear and easy. Many functions that are often useful in algorithmic composition are provided with this library - therefore the composer could concentrate rather on the composition than the programming aspects.

The Real Time Composition Library (RTC-lib) was developed during my extensive work on Lexikon-Sonate (1992 ff.), an interactive realtime composition for computer-controlled piano.

Regardless the fact that it was conceived for a specific project it became more and more obvious that its functionalities are open and generic enough to be used by other composers in different compositional contexts. Based on paradigms which have been extracted from serial thinking (cf. Gottfried Michael Koenig and Karlheinz Stockhausen) and its further development until nowadays it does not force towards a certain aesthetic, but provides a programming environment for testing and developing compositional strategies.

The Real Time Composition Library comes with a Hypertext-like on-line help which allows to have a perfect overview on the library objects and their multiple relationships.


At the beginning of 2014, a new version of RTC-lib for Max has been released which runs on Intel processors under Mac OS X 10.6 or later (including Mavericks), compatible with Max5 and Max6.x



The RTC-lib is composed of different categories of objects: Toolbox, Chance, Lists, Harmony, Rhythms, Envelopes, MSP objects, Jitter objects.

RTC Overview

Content of the RTC-lib 6.0
copyleft 1993-2014

The library consists mainly of "abstractions" (Max patches that appear as objects) and a few so-called externals programmed in C. Most of them have been written by myself, with some contributions from other authors like Gerhard Eckel (GMD, St. Augustin) and Serge Lemouton (IRCAM, Paris), James McCartney (namely his generic list objects), and Peter Elsea's (UCSC) selected list objects from his Lobjects library. Other contributions came from Gary Lee Nelson, Les Stuck, Chris Dobrian, Timothy Place, Orm Finnendahl, Trond Lossius and jasch. Because the library objects are highly dependent on each other, it is recommended not to take them apart.

RTC-lib Objects

16step-seqAbstractionrhythmical sequencer
@AbstractionScales a standard slider (ranging from 0 to 127) between min and max.
add%AbstractionAdds a certain percentage <int, float> to values <int, float> in left inlet.
aleaAbstractionrandom based object
alea-rhythmAbstractionrhythm generator
anti-bisAbstractionFilters out immediate repetitions of integers. Right output sends a bang whenever this occurs.
anti-bis&oscAbstractionFilters out direct repetitions and when a number has occured the penultimate time
anti-intervalAbstractionFilters out a certain interval
anti-octaveAbstractionFilters out octaves between two consecutive notes
anti-octave&primeAbstractionFilters out octaves and primes
anti-oscAbstractionFilters out an integer which has occured the penultimate time.
bangerExternalAn object to bang outlets sequentially.
betweenAbstractionrandom based object
between-linAbstractionrandom based object
between-lin-urnAbstractionrandom based object
between-logAbstractionrandom based object
between-log-urnAbstractionrandom based object
block-bangAbstractionFilters out bangs that arrive before a certain time span ("blocking time") is over.
BPM2msAbstractionConverts beats per minute (BPM) into milliseconds.
brown-melodyAbstractionGenerates a brownian-mouvement-like melody
brown-rhythmAbstractionGenerates a brownian-movement-like rhythm
brownianAbstractionrandom based object
butfirstAbstractionOutputs the input list without its first element.
butlastAbstractionOutputs the input list without its last element.
check-octavesAbstractionChecks whether an interval list sums up to an octave
check-rowAbstractiondodecaphonic based object
choice-rhythmAbstractionrhythm generator
choose-intervalsAbstractionChooses a supply between one to five different intervals.
collectAbstractionCollects numbers
contrarioAbstractionA number <int, float> in left inlet outputs a complimentary number.
cos-sliderAbstractionTransforms a linear slider into a cosine function.
count-bangAbstractionCounts the number of received bangs.
countdownAbstractioncountdown object
cp-pan~Abstractionconstant power panner
cresc-decrescAbstractioncrescendo / decescendo generator
crossfade~AbstractionCrossfades two input signals according to a sine function which guarantees that loudness of the result is constant.
dB2linAbstractionConverts dB into linear values.
DblBangPatchDetects single or double bang
del-fb~AbstractionDelay line with feedback.
divmodAbstractiondivmod is the same as / and % for positive left operands.
dur-from-EDAbstractionCalculates note durations from entry delays (ED) and a duration factor.
ED-rhythmAbstractionrhythm generator
ED-transAbstractionproduces a ritardando or an accelerando
ED2EPAbstractionConverts ED (= entry delays) into EP (= entry points)
firstAbstractionOutputs the first element of a list.
first-bangAbstractionOutputs only the first bang of a stream of bangs
first-shotAbstractionOutputs only the first message of a stream of messages (bangs, ints, floats, symbols, lists) until the right inlet receives a (reset) bang.
frq2noteAbstractionConverts frequency into a note
geomAbstractionInt in right inlet outputs the nth member of a geometrical row.
grid-rhythmAbstractionrhythm generator
groupAbstractiongroups numbers received in succession into a list.
group-rhythmAbstractionrhythm generator
group-rhythm2Abstractionrhythm generator
groupsAbstractionrandom based object
inc-decAbstractionFunctional implementation of the graphical user interface object Inc-Dec.
infinity-rowAbstractionpitch generator
insertAbstractionInserts an element after a position (= index) in the list
integAbstractionAccumulates input values <int, float> until a bang (or any input) is sent to the right inlet.
intv2ratioAbstractionConverts an interval into a ratio.
invAbstractionCalculates the inversion of a number.
joinAbstractionJoins two lists together.
key-bangAbstractionSends out a bang whenever a certain key is pressed.
LaddExternalAn object to add two lists, member by member.
lastAbstractionOutputs the last element of a list.
LdivExternalAn object to divide one list by another, member by member.
lin2dBAbstractionConverts linear values into dB.
listregAbstractionthis is for lists what the int object is for integers.
listlenAbstractionlistlen - outputs the length of a list or anything arriving at its inlet.
LmultExternalAn object to multiply two lists, member by member.
loop-sf~AbstractionLoops a selected mono sndfile.
LpowExternalAn object to raise the members of a list to the powers set in another list.
LremExternalAn object to divide one list by another, member by member and output a list of the remainders.
LroundExternalRounds off members of a list to desired precision.
LsubExternalAn object to subtract two lists, member by member.
make-choice-listAbstractionrandom based object
make-choice-listAbstractionrandom based object
make-ED-scaleAbstractionlist generator
make-scaleAbstractionlist generator
make-trans-scaleAbstractionlist generator
markovAbstractionprobability based object
markov-harmonyAbstractionpitch generator
markov-rhythmAbstractionrhythm generator
matrix12Externaldodecaphonic row manipulations
max-cursorAbstraction1 or 0 send to the inlet (or given as an argument) shows or hides the mouse cursor.
max-menubarAbstraction1 or 0 send to the inlet (or given as the argument) switches MAX's menubar on or off.
max-overdriveAbstraction1 or 0 send to the inlet
max-quitAbstractionQuits MAX immediately - BEWARE!
memberAbstractionlist based object
metro-dev%Abstractionrhythm generator
minusAbstractionSimply makes the negative of an int sent to the input.
ms2secAbstractionConverts milliseconds into seconds.
MSP-iovs~Abstractionselect I/O vector size
MSP-sigvs~Abstractionselect signal vector size
MSP-sr~AbstractionSets the sampling rate of MSP.
MSP-takeover~AbstractionMSP takeover
multipleAbstractionlist based object
neutral-harmonyAbstractionpitch generator
normalize-rowAbstractionNormalization of a twelve-tone row
note2centsAbstractionShows how many cents a microtonal note <float> is deviating from a tempered one.
note2frqAbstractionConverts a note into frequency.
note2pitchAbstractionOutputs the pitch class of a note
note2stAbstractionOutputs the intervals of an incoming stream of notes
nthAbstractionoutputs the nths element of a list
panningAbstractionEqual power panning based on John Chowning's paper "Simulation of Moving Sound Sources".
passAbstractionLet a certain percentage of bangs pass.
pass-bangAbstractionLet every nth bang pass.
per2passAbstractionConverts a periodicity factor <float between 0 and 1> into a percentage value <int between 0 and 100> for the pass-object.
periodicAbstractionrandom based object
permutateAbstractionrandom based object
permutate-rowAbstractiondodecaphonic based object
permuteExternalreturns the nth permutation of a list
pieceAbstractionlist based object
pitch-from-intervalsAbstractionpitch generator
pitch-from-rowAbstractionpitch generator
pitch-from-rowAbstractionpitch generator
pitch-from-row-modAbstractionpitch generator
pitch-from-row-modAbstractionpitch generator
pitch2noteAbstractionCombines pitch class and register into a note
playAbstractionPlays a note whenever a key number is sent to the left inlet.
play-samp~AbstractionPlays one sample.
play2AbstractionPlays a note whenever a key number is sent to the left inlet.
positionExternalposition - sorts a list in the left inlet using the index numbers in the right inlet.
QT-PercPlayerAbstractionPlays General MIDI percussion instruments directly from Quicktime
QT-SndPlayerAbstractionPlays General MIDI instruments directly from Quicktime
random-norepAbstractionrandom based object
random-pan~Abstractionrandom pan
random-rampAbstractionGenerates randomly fluctuating envelope shapes of a given dynamic scale
random-rowAbstractionrandom and dodecaphonic based object
RandomSeederAbstractionrandom based object
ratioAbstractionChooses elements from a supply <int list> which are repeated according to a multiple list <int list> by using the "series" selection principle.
ratio2intvAbstractionConverts a ratio into an interval
reanimateAbstractionSends out a bang on right outlet after x miliseconds if there has been no input bang in left inlet during x miliseconds.
removeAbstractionRemoves the nth element of a list.
remove-dc~AbstractionRemoves the DC offset of an audio signal.
repchord-rhythmAbstractionrhythm generator
repeat-EDAbstractionsends out a certain number of rhythm bangs
replaceAbstractionReplaces an element of a list
reverseAbstractionreverses a list of numbers.
rit-accAbstractionGenerates a ritardando or an accelerando
rotaAbstractionrandom based object
rotateAbstractioncyclically rotate a list
roundAbstractionround to next higher integer
roundtoAbstractionA number sent to right inlet is rounded onto a certain "grid" <int, float> sent to right inlet.
row-modusAbstractiondodecaphonic based object
rtc.fullscreenAbstractiontoggles between full screen and window view
samp10~AbstractionAllows a polyphony of up to 10 samples at the same time.
scale-changerAbstractionscale changer
schwellerAbstractiondecrescendo-crescendo envelopes generator
scrambleAbstractionscrambles the order of a list of numbers.
sectAbstractionoutputs a list which contains only atoms that appear in both input lists.
sel-princAbstractionrandom based object
sequenceAbstractionoutputs the next element of a list
serial-rhythmAbstractionrhythm generator
seriesAbstractionrandom based object
showAbstractionDisplays a list in a message box.
showchordAbstractionShows the pitch of a chord of MIDI note numbers.
shownoteAbstractionShows the pitch of a MIDI note number.
sliceAbstractiondivides a list in two.
smooth-lineAbstractionInterpolates smoothly between successive input values.
sneakAbstractionrandom based object
sneak-randomAbstractionrandom based object
sneak-rhythmAbstractionrhythm generator
sortAbstractionsorts a list.
sqrt-pan~Abstractionsquare root panner
st2pitchAbstractionAccumulates incoming intervals and outputs pitch classes
sumAbstractionSums up a numerical list containing integers and/or floats.
super-rhythmAbstractionrhythm generator
trans-expExternalexponential transition
trans-linAbstractionlinear transition
trans-logAbstractionlogarithmical transition
transp-pitchAbstractionTransposes pitch classes by a certain interval.
transpose-rowAbstractiondodecaphonic based object
unionAbstractionoutputs a list which contains all atoms that appear in either or both input lists.
uniqueAbstractionunique puts out a list comprised of those items in the left input list that are not contained in the right input list.
VolAmbAbstractionControls the ambitus between minimum and maximum dynamic by a single controller.
xrandomAbstractionrandom based object


The development of the RTC-lib started in 1992 when I was working at IRCAM on a commission - Entsagung for ensemble and live-electronics. Having worked with computer-aided composition algorithms before on an Atari using an experimental LOGO implementation I came across Max. I immediately felt in love with it for it offered the possibility of realtime processing and interactivity. (In LOGO, it took many hours to calculate a score list which I had to transcribe into of musical notation in order to analyze it - a very time-consuming procedure).

At this time, Max appeared as programming environment mainly optimized for MIDI processing. List operations (which are crucial for my own compositional thinking which stems from serialism) have not been implemented yet. Higher-level compositional tools were not available, only customized solutions for specific problems which were not geneneric enough to be used in different contexts.

In order to create an evironment which enables one to concentrate rather on high-level compositional questions than on low-level technical problems, Gerhard Eckel and I started to develop a set of tools which became the corner stones of the RTC-lib. At the this time, Serge Lemouton (my musical assistant at IRCAM) wrote "nth" according to my indications, James McCartney released his "list objects", and a few years later Peter Elsea developed his "LObjects" (inspired by RTC-lib, as he told me). Some externals from these packages were included into the RTC-lib, and Peter Elsea was nice enough to port some of my abstractions (like trans-log) to C-externals.

On this basis, I developed a large number of higher-level compositional algorithms written as "abstractions" (objects, coded in Max): rhythm generators, harmony generators, chance operations, ramp generators, MSP functions etc. which are often based on those primordial externals that have been implemented by other authors.

Those externals (the low-level side of the RTC-lib) need to be re-compiled for each operation system. We had to make the shift from 68k processors to PPC, and now to OSX. Thanks to Peter Elsea and Thomas Grill most of the externals has been ported to Windows XP and I transformed some Macintosh specific externals back to abstractions. Thanks also to Frank Barknecht who made a version for Pd.

In 2008, the RTC-lib had to be updated in order to run on the new Intel processors. In order to ease the future maintenance, I reformulated most (but not all!) of the externals to abstractions.

As of 10 Jan 2010, a new version of RTC-lib for Max5 has been released with completely rewritten help files. Here, most of the remaining C-externals have been eliminated in order to run the library independent of computer platforms and operating systems.

The most recent release (31 Jan 2014) is optimized for Max6, but should also run with Max5.

RTC-lib for Windows

On Nov 29th, 2007 I released a new beta version of the RTC-lib for Windows XP version for download. Please note that I don't have the chance to test it myself for I am not working on a PC.

RTC-lib for Pd

Thanks to Frank Barknecht and others, RTC-lib is available for Pd (Pure Data). Download from khz96.org.

RTC-lib Tutorial

On April 1st, 2008 Karlheinz Essl has released a tutorial for his RTC-lib. It includes elaborated examples for algorithmic composition in real time. As of January 10th, 2010 an update of this tutorial for Max5 is also available.

This tutorial shows how selected compositorial issues such as harmony, rhythm, and random can be mastered with the aid of the RTC-lib. Furthermore it contains several especially adapted and documented structure generators from Karlheinz Essl's Lexikon-Sonate such as Triller, MeloChord, and Esprit.

The RTC-lib Tutorial can be downloaded as a ZIP archive of text-only Max patches and also in the new Max5 format which can be opened under MacOS and Windows OS. Please note that you have to install the latest version of the RTC-lib in order to use the patches!




Structure Generators

RTC-lib Tutorial: Rhythm Scales

Rhythm Scales
© 1995-2008 by Karlheinz Essl


Lecture on Realtime Composition
Karlheinz Essl talking to music students of the University of Montana
Essl Museum, Klosterneuburg/Vienna (10 Jun 2010)


Robert Rowe: Machine Musicianship, p. 306-308 (MIT Press 2001) english

Karlheinz Essl: Lexikon-Sonate. An Interactive Realtime Composition for Computer-Controlled Piano
in: Proceedings of the Second Brazilian Symposium on Computer Music (Canela 1995) english

Karlheinz Essl: Strukturgeneratoren. Algorithmische Komposition in Echtzeit
Beiträge zur Elektronischen Musik, ed. by Robert Höldrich and Andreas Weixler, vol. 5 (Graz 1996) german

Karlheinz Essl & Bernhard Günther: Realtime Composition. Musik diesseits der Schrift
in: Positionen. Beiträge zur Neuen Musik, ed. by Gisela Nauck, vol. 36 (Berlin 1998) german

Own works realized with the RTC-lib

Entsagung (1991-93)
for flute, bass clarinet, prepared piano, percussion, 4 loudspeakers and interactive sound diffusion environment

Lexikon-Sonate (1992 ff.)
Interactive Realtime Composition for Computer-Controlled Piano

Klanglabyrinth (1992 ff.)
Interactive Realtime Composition for the IRCAM Musical Workstation (ISPW) or 2 CD-Players

Amazing Maze (1993-2000)
Interactive Realtime Composition for Sampled Sound Particles and Optional Live-Performer(s)

Lexicon-Oracle (1996)
Computer-Generated Infinite Text Composition

MindShipMind (1996-98)
Interactive Multimedia Computer Installation with Video, Sound, and Computer Speech

Interferences (1996/97)
Interactive Realtime Composition for Computer-Controlled Percussion Sounds

Champ d'Action (1998)
Interactive Realtime Composition for Computer-Controlled Ensemble

Lexicon-Lecture (1998)
interactive multimedia computer installation with realtime generated computer speech, video and piano music

fLOW (1998/99)
self-generating sound environment

m@ze°2 (1999-2005)
Modular Algorithmic Zound Environment for electro-acoustic live-performance

conVex (1999)
realtime generated sound scape based on 12 chords of Eric Satie's "Vexations"

onwards (1999/2000)
for three instruments and computer

da braccio (1999/2000)
for viola d'amore, live-electronics and computer

The Untempered Piano (2000)
interactive sound installation

REplay PLAYer (2000 ff.)
generative soundfile shredder

es wird (2000)
generative computer installation

ALLgebrah. Eine Kopfwelt (2001)
sound and video performance, dedicated to Adolf Wölfli

Temps fugitive (2001)
realtime-generated sound and video installation

ON FIRE (2001)
realtime-generated sound scape for a room installation of Fabricio Plessi

realtime-generated video/sound environment (using Jitter for the first time!)

electronic music for a light installation by Martin Kaar

Segreto Spaziale (2003)
for solo violin, computer, live-electronics and multi-channel sound projection

Le mystère d'orgue (2003)
generative sound installation for Hermann Nitsch

Seelewaschen (2003)
multi-channel sound environment for a light installation by Rainer Gottemeier

ULURU (2004)
multi-channel sound environment for an exhibition on Aboriginal Art

el-emen' (2004)
for solo percussion, live-electronics and 4 loudspeakers

Kalimba (2005)
for toy piano and CD playback

Through the Curly Rain-Taps (2005)
generative visuals for a sound installation by Ramón González-Arroyo (written in Jitter)

WebernUhrWerk (2005)
algorithmic music for computer-controlled Carillon

nature / morte (2005/2006)
generative sound installation for an exhibition on Viennese Actionism

Von Hirschen und Röhren (2006)
Eine tönende Installation von Beat Zoderer und Karlheinz Essl

Panta Rhei (2006)
generative soundscape for an art installation by Jürgen Messensee

(7x7)7 (2006)
generative sound environment for an animation video by by Jürgen Messensee

AIR BORNE (2006)
permanent sound installation for the Adlershof (Humboldt University, Berlin)

Berliner Luft (2006)
generative soundscape for a room installation by Johanes Zechner

Fräulein Atlantis (2007)
generative sound and video environment for a room installation by Jonathan Meese

BOCHUMSTEP (2008/2009)
permanent sound environment for a light installation by Rainer Gottemeier

Sequitur (2008-2010)
14 compositions for solo instruments and live-electronics including flute, clarinet, saxophone, trumpet, violin, cello, toy piano, e-guitar, voice etc.

Pandora's Secret (2009)
sound performance for music box and live-electronics

whatever shall be (2010)
for toy piano and live-electronics

Proper Ties (2010)
generative sound installation

blurred (2007/2011)
for alto flute, vibraphone, cello and live-electronics

juncTions (2011/12)
for extended piano (two players) and live-electronics

Si! (2012)
for tenor tuba, live-electronics and surround sound

Suspended Suspense (2012)
generative soundscape for an art installation by Xenia Hausner

WalkürenWalk (2013)
electronic sound performance for computer and controllers

Tristan's Lament (2013)
electronic sound performance for computer and controllers

Pachinko (2013)
for toy piano and computer

Herbecks Versprechen (2014)
electronic sound performance upon a poem by Ernst Herbeck


This software is copyrighted by Karlheinz Essl and others. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files.

The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply.



RESTRICTED RIGHTS: Use, duplication or disclosure by the government is subject to the restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software Clause as DFARS 252.227-7013 and FAR 52.227-19.


Max6   RTC-lib 6.0.1 for Mac OS X
for Max5/Max6 under Mac OS X 10.6 or later; Intel processors
released 19 Mar 2014: ZIP archive for Mac (1.2 MB) new

Max5   RTC-lib 5.0 for Mac OS X
for Max5/Max6 under Mac OS X 10.4 or later; PPC or Intel processors
released 10 Jan 2010: ZIP archive for Mac (940 kB)

Universal Binary   RTC-lib 4.7 for Mac OS X (Universal Binaries)
for MaxMSP 4.6 under Mac OS X 10.4; PPC or Intel processors
released 2 Apr 2008: ZIP archive for Mac (740 kB)

  RTC-lib 4.0.2 for Mac OS X
for MaxMSP 4.5 under Mac OS X 10.2 (or higher); PPC processors only
released 26 Jan 2004: binhexed stuffit archive (636 kB)

Windows XP   RTC-lib 4.1.1 beta for Windows XP
uploaded 5 Dec 2007: ZIP archive for PC (850 kB)

PD   RTC-lib 1.0 for Pd
uploaded 15 Nov 2010: ZIP archive (172 kB)
Thanks to Frank Barknecht for porting to Pd!

Home Works Sounds Bibliography Concerts

Updated: 15 Mar 2014