Skip to content

Algorithmic Composition

Algorithmic composition builds music from formal rules or probabilities, from 18th-century dice games to Xenakis, the Illiac Suite and live coding.

  • 1757

  • Experimental family

Black-and-white view of the Philips Pavilion at Expo 58 in Brussels, a tent-like concrete structure of sharp peaks with visitors seated along its base
  • Born

    1757

  • Subgenres

    3

    Documented branches

  • Links

    2

    Genres it drew on or shaped

Tempo

70-150 BPM
Free or 4/4, set by the rules

Lineage

Family tree

Grew out of

    Algorithmic Composition

    Led to (3)

    Black MIDI
    Generative Music
    Live Coding

    Timeline

    Era by era

    From the first sparks to today. Select a dot to read the story behind it.

    1. Dice games and rule systems

      1757 to 1953

    2. Stochastic scores and mainframes

      1954 to 1969

    3. Studios, UPIC and generative systems

      1970 to 1990

    4. Style models and live code

      1991 to today


    Listening path

    Start listening

    A short path from an easy way in to the deep end. Thumbnails come from YouTube; the player loads only when you press play.

    1. 01

      Iannis Xenakis, 1954

      Xenakis's first mature orchestral work, where sliding string masses are planned like architecture.

    2. 02

      Iannis Xenakis, 1956

      Each string player is a gas molecule under statistical law; the clearest early case of stochastic composition.

    3. 03

      Iannis Xenakis, 1958

      A tape piece made only from burning charcoal, a dense texture shaped by density rather than melody.

    4. 04

      Brian Eno, 1975

      A synthesizer sequence run through tape loops so that the system, not the composer, shapes the surface.

    5. 05

      Iannis Xenakis, 1991

      Sound synthesised by random walks on the waveform itself, the end point of Xenakis's stochastic method.


    Algorithmic composition is the making of music by applying algorithms or formal rule systems to generate compositional material.

    It reaches back to eighteenth-century dice games, took modern form in the 1950s through Iannis Xenakis’s probability-based scores and the first computer-generated score, and now includes style-imitating programs and live-coded performance. The composer designs the rules and the choices made inside them rather than writing each note.

    Origins

    Rule-bound composition is older than computers. The procedures used to plot voice-leading in Western counterpoint can often be reduced to algorithmic determinacy, and in the eighteenth century the rules became a parlour game. The musical dice game, the Musikalisches Würfelspiel, joined small precomposed bars into a piece by chance. The earliest printed example is Johann Kirnberger’s minuet and polonaise composer of 1757, followed by C. P. E. Bach in 1758 and Maximilian Stadler in 1780.

    The best-known version was published in Berlin in 1792 by Mozart’s publisher Nikolaus Simrock and carried Mozart’s name on its cover, though the attribution has not been authenticated. Each roll of two dice picked one of eleven versions of a bar, which allows about 759 trillion different but similar waltzes.

    Writers on the field now sort methods into six overlapping types: mathematical models, knowledge-based systems, grammars, evolutionary methods, systems that learn, and hybrids.

    Paris and Urbana, 1954-1969

    The modern history starts in two places at almost the same time. In Paris, Xenakis had fled Greece in 1947 and worked as an assistant to the architect Le Corbusier while studying composition. Olivier Messiaen told him to use his mathematics and architectural training in his music. Metastaseis (1953-54) took its structure directly from architectural ideas and is generally regarded as his first mature piece. Pithoprakta (1955-56) went further: each of 46 string parts was treated as a molecule in a gas, obeying the Maxwell-Boltzmann distribution, with pitch and time drawn first as a graph and then transcribed into notation. Hermann Scherchen conducted its premiere in Munich in March 1957. Xenakis set out his method in Formalized Music, published in French in 1963 and in English in 1971, and a Fortran program he wrote in 1962 for an IBM 7090 was shown at a Xenakis exhibition.

    A pencil and ink study of the Philips Pavilion showing steep pointed planes with a small group of figures at the base, framed on a dark wall
    An early study of the Philips Pavilion; Xenakis designed the building and wrote Concret PH for its entrance in 1958.

    In Urbana, the chemist and composer Lejaren Hiller, who had studied with Roger Sessions and Milton Babbitt and worked for DuPont, programmed the ILLIAC I computer at the University of Illinois with Leonard Isaacson. The result, the Illiac Suite of 1957, is generally agreed to be the first score composed by an electronic computer. Its four movements are four experiments: cantus firmi, four-voice segments under various rules, rhythm and dynamics, and Markov chains. Hiller met hostility from the musical establishment, and the major music dictionaries left him out until shortly before his death. He founded the Experimental Music Studios in 1958 and, with Robert Baker, the MUSICOMP language for the Computer Cantata of 1963.

    A cardboard box labelled in red marker as a Fortran program from 1962 by Xenakis for the IBM 7090, with a stack of punched cards marked XEN 2799 beneath it
    Punched cards and a box for Xenakis's 1962 Fortran program, shown at a Xenakis exhibition.

    Gottfried Michael Koenig took a different route. After ten years in the electronic studio of West German Radio, where he assisted Stockhausen on Gesang der Jünglinge and Kontakte, he moved to Utrecht in 1964 and wrote Project 1 that year and Project 2 in 1966. These programs formalised variants of musical structure; the output was then worked into scores by hand, which made them an early model of computer-assisted composition. At the end of the decade John Cage and Hiller staged HPSCHD on 16 May 1969 in front of about 6,000 people. Harpsichordists played alongside 208 tapes of computer-generated sound and projections of 6,400 slides and 40 films, in a five-hour event the audience could wander through.

    Studios, UPIC and systems, 1970-1990

    Through the 1970s the work moved into university and radio studios. Koenig’s studio at Utrecht became the Institute of Sonology, and his electronic works Terminus II and Funktion Grün appeared on a 1970 Deutsche Grammophon LP in its Avantgarde series. Outside the academy, Brian Eno’s Discreet Music (1975) tried to make music with limited planning. A short sequence from a synthesizer’s built-in memory passed through an equaliser and an echo unit, and the signal circulated between two tape machines, so the piece largely ran itself. The record’s second side holds three variations on Pachelbel’s canon performed under written rules, such as players slowing down at rates tied to their instrument’s pitch.

    A large drafting-table-sized graphic tablet with a pale grid and a column of green and red labelled control keys, tilted on a stand in a gallery
    The UPIC graphic tablet, on which drawn lines become sound.

    In 1977 Xenakis’s UPIC was finished at the CEMAMu in Paris. It is a digitising tablet linked to a computer, where the horizontal axis stands for time and the vertical axis for pitch, so a drawing becomes a score. He used it for Mycènes Alpha in 1978, and later composers including Jean-Claude Risset and Curtis Roads worked with it. In 1981 David Cope, blocked on an opera commission, began the program that became EMI, Experiments in Musical Intelligence, to model his own style.

    Style models and live code, 1991 to present

    Xenakis’s GENDY3 of 1991 applied his stochastic thinking to sound itself, shaping a waveform in time and amplitude by random walks. In the same decade Cope turned EMI on the music of Bach, Mozart, Chopin and others and released Bach by Design in 1994, performed on a Disklavier. In 2005 Cope deleted its database, arguing that infinitely reproducible output was being devalued. His next program, Emily Howell, built its own pieces from listener feedback and gave the album From Darkness, Light (2009). Cope died on 4 May 2025.

    A woman with long dark hair performing in front of a large screen of code and colourful projected geometry, seated at a table with a laptop
    Alexandra Cardenas performing with the TidalCycles pattern language, projecting her code.

    Meanwhile the dance floor took algorithms up. Algorithmic approaches were present in electronic dance music from the 1970s, through Eno’s randomised practices, and fed the 1990s work of Farmers Manual, Autechre and Aphex Twin. Autechre’s Anti EP of 1994 answered the Criminal Justice and Public Order Act with Flutter, a track built for non-repetitive beats. Live coding turned writing the program into the performance itself, and in 2011 Alex McLean and Nick Collins coined the word algorave for events where people dance to such music. Generative music and Black MIDI both grew out of the same ideas.

    Characteristics

    Most pieces follow the same sequence: material or constraints go in, a rule set or probability model runs, the composer selects from the output, and the result becomes a score for players or sound itself. What the rules govern varies. Xenakis controlled density and pitch distributions, Hiller tested melodies against counterpoint rules, Koenig varied structure, Eno let a tape loop run, and Cope’s programs recombined patterns from existing scores. Tempo and meter come from the rules, not from a genre convention.

    Instruments and production

    The tools have been as varied as the methods: a vacuum-tube mainframe for the Illiac Suite, a drawing tablet for UPIC, a Disklavier for Cope’s recordings, tape machines for Eno, and laptops running TidalCycles for live coders. Output goes either to players as notation, as in Hiller’s string quartet, or directly to sound, as in GENDY3.

    Culture

    HPSCHD set the tone for a culture of ritual and play around chance. Its posters and paper tunics used images chosen by chance operations, and copies were priced with an I Ching chart. Douglas Hofstadter toured a lecture in which audiences heard a real Chopin piece and an EMI piece and guessed no better than chance which was which. Live coding made the code visible, with the screen projected behind the performer, and algorave nights have spread to cities from London to Bengaluru.

    A performer in a dark blue room looking at a laptop, with lines of live code projected across the wall behind and onto his face
    A live coder at an independent algorave in Bengaluru, with the code projected behind him.
    A night rooftop in Mumbai with a projector screen of code on the left, apartment towers lit behind, and a few people standing near the projection
    A rooftop live-coding session in Mumbai, December 2019.

    Legacy

    The ideas have spread well beyond experimental concert music. The genre sits in the Experimental family beside Electroacoustic music, whose studios hosted much of the early work, and Fluxus, which shared Cage’s chance procedures. Algorithmic methods also reached IDM and, through Eno, ambient music. Generative music, live coding and Black MIDI all branch directly from algorithmic composition.

    Misconceptions

    Algorithmic composition is often assumed to need a computer. Kirnberger’s dice game dates from 1757, counterpoint rules were already algorithms, and Xenakis was scoring from probability in the mid-1950s with graph paper and calculation.

    The Mozart dice waltz is often cited as his invention. The 1792 edition carried his name, but the attribution has never been authenticated, and the 1787 manuscript with 176 one-bar fragments contains no instructions and no evidence that dice were involved.

    A third belief holds that the composer disappears. Xenakis weighted the probabilities, Koenig’s output was shaped by hand into performance instructions, and most of Hiller’s works after 1957 did not use computers at all. The rules are an authored decision.

    Frequently asked questions

    What is algorithmic composition?

    Algorithmic composition is the technique of using algorithms or formal rule sets to create music. The rules may be written by hand, as in a dice game, or run by a program, as in the Illiac Suite and live coding.

    What was the first computer-composed music?

    The Illiac Suite of 1957, by Lejaren Hiller and Leonard Isaacson, is generally agreed to be the first score composed by an electronic computer. It was generated on the ILLIAC I at the University of Illinois.

    How did Xenakis use mathematics in music?

    Xenakis applied probability theory and statistical mechanics. In Pithoprakta each string instrument behaves like a gas molecule, and in GENDY3 random walks shape the waveform itself.

    Is algorithmic composition the same as generative music?

    They overlap. Algorithmic composition covers any rule-based method, while generative music describes ever-changing music produced by an ongoing system, a term Brian Eno popularised in 1995.

    What is an algorave?

    An algorave is an event where people dance to music generated from algorithms, usually live-coded. Alex McLean and Nick Collins coined the term in 2011.


    Sound

    Sound sheet

    Anatomy of a track

    #Part
    1Source material or constraints
    2Rule set or probability model
    3Generation run
    4Selection and editing by the composer
    5Score or synthesis output

    Signature sounds

    • Rules written before the notes
    • Probability distributions shaping density and pitch
    • Many runs, one chosen
    • Output as a score for players or as direct sound

    Techniques

    • Stochastic distributions
    • Markov chains
    • Rule-based counterpoint
    • Chance operations
    • Style recombination
    • Dynamic stochastic synthesis

    Tuning

    Mostly 12-tone equal temperament in scored pieces; synthesis and drawn sound can use continuous pitch

    Vocals

    Mostly instrumental; voices appear as source material in individual scores


    Scenes

    Where it happened

    Where and when the sound lived: one bar per city on a shared timeline.

    Europe

    Paris1954 to today
    Utrecht1964 to today

    North America

    Urbana1957 to today

    Active scenes

    Peak 3, 1964-2025

    Urbana, 1957 to today

    Home of the ILLIAC I, the Illiac Suite and the Experimental Music Studios founded by Hiller in 1958.

    Paris, 1954 to today

    Xenakis worked here as an architect and composer, and the UPIC was built here.

    Utrecht, 1964 to today

    Koenig directed the electronic music studio, later the Institute of Sonology, and wrote Project 1 and 2.

    Venues and places

    Experimental Music Studios
    Studio

    Urbana, 1958 to today. Hiller founded the studios at the University of Illinois the year after the Illiac Suite.

    Assembly Hall
    Venue

    Champaign, 1969 to today. Site of the HPSCHD premiere before an audience of 6,000.

    Utrecht electronic music studio
    Studio

    Utrecht, 1964 to today. Koenig moved to the Netherlands in 1964 and led the studio until 1986.


    Culture

    Culture markers

    • Algorave

      Dance events with code-generated music, often live coded, coined in 2011.

      Dance
    • HPSCHD posters and tunics

      Images were chosen by chance operations and copies were priced with an I Ching chart.

      Artwork
    • Graph-paper scores

      Xenakis drew Pithoprakta first as a graph of pitch against time before transcribing it into notation.

      Artwork
    • The Chopin test

      In Douglas Hofstadter's lectures, audiences guessed no better than chance which piece was Chopin and which was EMI.

      Ritual

    Media

    Key media

    1. 1963
      Formalized Music: Thought and Mathematics in Composition

      by Iannis Xenakis. Xenakis's theory of stochastic music, first published in French and translated into English in 1971.

      Book

    Glossary

    Terms on this page


    Experimental family

    More in Experimental