Algorithms (or, at the very least, formal sets of rules) have been used to compose music for centuries; the procedures used to plot voice-leading in Western counterpoint, for example, can often be reduced to algorithmic determinacy. The term is usually reserved, however, for the use of formal procedures to make music without human intervention, either through the introduction of chance procedures or the use of computers.
Some algorithms or data that have no immediate musical relevance are used by composers as creative inspiration for their music. Algorithms such as fractals, L-systems, statistical models, and even arbitrary data (e.g. census figures, GIS coordinates, or magnetic field measurements) have been used as source materials.
- 1 Models for algorithmic composition
- 2 See also
- 3 References
- 4 Sources
- 5 Further reading
- 6 External links
Models for algorithmic composition
There is no universal method to sort different compositional algorithms into categories. One way to do this is to look at the way an algorithm takes part in the compositional process. The results of the process can then be divided into 1) music composed by computer and 2) music composed with the aid of computer. Music may be considered composed by computer when the algorithm is able to make choices of its own during the creation process.
Another way to sort compositional algorithms is to examine the results of their compositional processes. Algorithms can either 1) provide notational information (sheet music) for other instruments or 2) provide an independent way of sound synthesis (playing the composition by itself). There are also algorithms creating both notational data and sound synthesis.
- mathematical models
- knowledge-based systems
- evolutionary methods
- systems which learn
- hybrid systems
Mathematical models are based on mathematical equations and random events. The most common way to create compositions through mathematics is stochastic processes. In stochastic models a piece of music is composed as a result of non-deterministic methods. The compositional process is only partially controlled by the composer by weighting the possibilities of random events. Prominent examples of stochastic algorithms are Markov chains and various uses of Gaussian distributions. Stochastic algorithms are often used together with other algorithms in various decision-making processes.
Music has also been composed through natural phenomena. These chaotic models create compositions from the harmonic and inharmonic phenomena of nature. For example, since the 1970s fractals have been studied also as models for algorithmic composition.
As an example of deterministic compositions through mathematical models, the On-Line Encyclopedia of Integer Sequences provides an option to play an integer sequence as 12-tone equal temperament music. (It is initially set to convert each integer to a note on an 88-key musical keyboard by computing the integer modulo 88, at a steady rhythm. Thus 123456, the natural numbers, equals half of a chromatic scale.)
One way to create compositions is to isolate the aesthetic code of a certain musical genre and use this code to create new similar compositions. Knowledge-based systems are based on a pre-made set of arguments that can be used to compose new works of the same style or genre. Usually this is accomplished by a set of tests or rules requiring fulfillment for the composition to be complete.
Music can also be examined as a language with a distinctive grammar set. Compositions are created by first constructing a musical grammar, which is then used to create comprehensible musical pieces. Grammars often include rules for macro-level composing, for instance harmonies and rhythm, rather than single notes.
Evolutionary methods of composing music are based on genetic algorithms. The composition is being built by the means of evolutionary process. Through mutation and natural selection, different solutions evolve towards a suitable musical piece. Iterative action of the algorithm cuts out bad solutions and creates new ones from those surviving the process. The results of the process are supervised by the critic, a vital part of the algorithm controlling the quality of created compositions.
Evolutionary methods, combined with developmental processes, constitute the evo-devo approach for generation and optimization of complex structures. These methods have also been applied to music composition, where the musical structure is obtained by an iterative process that transform a very simple composition (made of a few notes) into a complex fully-fledged piece (be it a score, or a MIDI file).
Systems that learn
Learning systems are programs that have no given knowledge of the genre of music they are working with. Instead, they collect the learning material by themselves from the example material supplied by the user or programmer. The material is then processed into a piece of music similar to the example material. This method of algorithmic composition is strongly linked to algorithmic modeling of style, machine improvisation, and such studies as cognitive science and the study of neural networks. Marchini and Purwins  presented a system that learns the structure of an audio recording of a rhythmical percussion fragment using unsupervised clustering and variable length Markov chains and that synthesises musical variations from it.
Programs based on a single algorithmic model rarely succeed in creating aesthetically satisfying results. For that reason algorithms of different type are often used together to combine the strengths and diminish the weaknesses of these algorithms. Creating hybrid systems for music composition has opened up the field of algorithmic composition and created also many brand new ways to construct compositions algorithmically. The only major problem with hybrid systems is their growing complexity and the need of resources to combine and test these algorithms.
- Change ringing
- Computational creativity
- Computer music
- Euclidean rhythm (traditional musical rhythms that are generated by Euclid's algorithm)
- Evolutionary music
- Generative music
- Machine improvisation
- Musical dice game
- Pop music automation
- Programming (music)
- Jacob, Bruce L. (December 1996). "Algorithmic Composition as a Model of Creativity". Organised Sound (Cambridge University Press) 1 (3): 157–165. doi:10.1017/S1355771896000222. Retrieved 3 January 2013.
- Ball, Philip (2012). "Algorithmic Rapture". Nature 188: 456. doi:10.1038/488458a.
- Fernandez, JD; Vico, F (2013). "AI Methods in Algorithmic Composition: A Comprehensive Survey." (PDF). Journal of Artificial Intelligence Research 48: 513–582. doi:10.1613/jair.3908.
- Marchini, Marco; Purwins, Hendrik (2011). Unsupervised Analysis and Generation of Audio Percussion Sequences. pp. 205–218. doi:10.1007/978-3-642-23126-1_14.
- Computer Music Algorithms by Dr.John Francis. Music algorithmic computer programs representing all styles of music, with C source code,produces midi/wav files.2014
- A Few Remarks on Algorithmic Composition by Martin Supper. Computer Music Journal 25.1 (2001) 48-53
- COMPOSING WITH PROCESS: PERSPECTIVES ON GENERATIVE AND SYSTEMS MUSIC podcast, exploring generative approaches (including algorithmic, systems-based, formalized and procedural) to composition and performance primarily in the context of experimental technologies and music practices of the latter part of the twentieth century.
- Automatic Composition from Non-musical Inspiration Sources, by Robert Smith, et al. A conference paper describing a machine learning based approach to generating music by training a model on subject pieces and then generating new pieces based on non-musical audio files.
- Algorithmic Composition: Computational Thinking in Music by Michael Edwards. Communications of the ACM, Vol. 54 No. 7, Pages 58–67 10.1145/1965724.1965742. From the abstract: "This article outlines the history of algorithmic composition from the pre- and post-digital computer age, concentrating, but not exclusively, on how it developed out of the avant-garde Western classical tradition in the second half of the 20th century. This survey is more illustrative than all-inclusive, presenting examples of particular techniques and some of the music that has been produced with them."
- Phil Winsor and Gene De Lisa: Computer Music in C. Windcrest 1990. ISBN 978-1-57441-116-4
- Curtis Roads: The Computer Music Tutorial. MIT Press 1996
- George Papadopoulos: AI Methods for Algorithmic Composition : A survey, a Critical View and Future Prospects. AISB Symposium on Musical Creativity, 1999.
- Eduardo Reck Miranda: Composing Music with Computers. Focal Press 2001
- Karlheinz Essl: Algorithmic Composition. in: Cambridge Companion to Electronic Music, ed. by N. Collins and J. d'Escrivan, Cambridge University Press 2007. - ISBN 978-0-521-68865-9. - Abstract
- Gerhard Nierhaus: Algorithmic Composition - Paradigms of Automated Music Generation. Springer 2008. - ISBN 978-3-211-75539-6
- Wooller, Rene, Brown, Andrew R, Miranda, Eduardo, Diederich, Joachim, & Berry, Rodney (2005) A framework for comparison of process in algorithmic music systems. In: Generative Arts Practice, 5–7 December 2005, Sydney, Australia. 
|Wikimedia Commons has media related to Algorithmic compositions.|
Samples of algorithmic music
- Complex algorithmic compositions made largely with the software Fractmus posted on sound cloud: Coq Freisenberger.
- A jazz saxophone solo automatically generated by Band-in-a-Box: OGG vorbis format.
- The babelcast (RSS subscription feed, iTMS free subscription) and telequalia (RSS subscription feed, iTMS free subscription), algorithmic, computer-generated Podcast series by Christopher Ariza
- Samples with piano and cello from the computer program Randomusic.
- Samples of Paul Ramsay's Parallel Music (uses Shockwave): PMusic: SINGLES; Consemble Plymouth and Consemble (open compositions project).
- Samples of Karlheinz Essl's Lexikon-Sonate (MIDI and mp3).
- Samples from James Anthony Walker the art of jim.
- Samples from Dave Smith roughlight music
- Samples of Gary Lee Nelson's Fractal Music.
- Samples of Martin Dostál's GeneticDrummer System.
- Samples from Ensemble 176's online recordings.
- Sample of Atari 8-bit - Ballsong Nr. 2 by Douglas Crockford & Valerie Atkinson 
- Fractal Tunes you can make with Tune Smithy 3.0 sample fractal tunes made with Tune Smithy
- Videos of Tune Smithy fractal tunes, some with a scrolling "score"
- Abacus Milan Guštar 's algorithmic serial minimalistic composition for player piano.
- Samples from SoundHelix (mp3).
- Samples by René-Louis Baron "Medalmusic system" and "Music-Realcomposer" patented inventions.
- Samples by Jeremy Leach's software at his Algorithmic Composition site.
- Melomics' Iamus (computer)'s concert performed by the London Symphony Orchestra.
- Samples of Marchini and Purwins' unsupervised generation of percussion sequences YouTube (Paper: springer.com)
- AC Toolbox, Algorithmic Composition Toolbox, a free software tool for algorithmic composition.
- AISings an online service that automatically generates new music influenced by MIDI files selected by the user
- BreathCube A vocal algorithmic music generation engine (Windows file)
- Buddha Orchestra Windows and Ubuntu freeware that converts outlines of objects found in images to MIDI and OSC events.
- cgMusic is a free, extensible algorithmic composition program that can create tonal music in various styles. MIDI and MP3 samples are available on the website.
- QGen2 an algorithmic composition program written by Alexey Arkhipenko (Rhaos project)
- Fractal Tune Smithy an algorithmic composition program written by Robert Walker - see also Tune Smithy
- Fractal Music Composer by Michael Frame, Ginger Booth, and Harlan Brothers (Java)
- FractMus is a freeware algorithmic composition program written by Spanish composer and pianist Gustavo Díaz-Jerez.
- Harmony Improvisator, a VST plugin that composes with the rules of classical harmonic theory
- Impro-Visor: software that can generate jazz solos algorithmically using a user-specifiable stochastic context-free grammar.
- Intermorphic Noatikl, Noatikl is an algorithmic / trans-generative creativity system for Mac and Windows with VST, AU unit plugins, and is successor to Koan.
- Intermorphic Mixtikl, Mixtikl is a 12 track generative music lab with integrated Noatikl algorithmic engine for iPhone, iPad, iPod touch, Mac and Windows with web browser, VST and AU unit plugins.
- Lexikon-Sonate for computer-controlled piano by Karlheinz Essl (freeware for MacOS)
- MaestroGenesis MaestroGenesis is a freely available tool developed by the Evolutionary Complexity Research Group that helps amateur musicians compose and generate musical ideas.
- Musical Algorithms An interactive exploration of the relationship between music and mathematical formulas funded by the Northwest Academic Computing Consortium, project directed by Jonathan N. Middleton.
- Strasheela, a composition system that uses constraint programming and supports highly complex rule-based music theories (e.g. harmony).
- WolframTones, an algorithmic composer based on 1-dimensional cellular automata.
- Impromptu - A programming environment for real-time algorithmic composition.
- MusiNum Software to make music using number patterns.
- SoundHelix A free Java framework for algorithmic random music composition based on constrained random generation (CRG). Plays generated music on MIDI devices in real-time and can write MIDI files.
- RGB MusicLab Image data into a music. (MacOS and Windows)
- Easy Music Composer Easy Music Composer is a tool that makes music easily.
- Computoser An online service that generates algorithmic music with no human input.
- Melomics online browser and API to adapt multiple genres, tempos, and dynamics for the one of the world's largest repositories of music.
- Scripthica A web environment for learning, listening, sharing and creating algorithmic computer music.
- Algorithmic Composition Tutorials A series of algorithmic composition tutorials.