Algorithmic Composition A Listener's Guide hairylarryland.com/ac by Larry Heyl hairylarry@deltaboogie.com Overview Throughout history composers have used formulas or methods to steer or guide their compositions. Although we don't have the music these ideas were discussed in classical Greece. Pythagoreanism contemplated the correlation of music and mathematics describing the music of the spheres by John A. Maurer IV, March, 1999 https://ccrma.stanford.edu/~blackrse/algorithm.html Algorithmic Composition Wikipedia article - short overview and many links http://en.wikipedia.org/wiki/Algorithmic_composition Reading through these brief histories we find many algorithmic techniques that can be used to generate music. Here is a quick overview of some of the methods used. There is not and can never be a complete classification of algorithmic composition techniques because composers keep devising new ways to program music. Rule based systems can use formulas, data tables, or formal grammars to generate deterministic compositions where for a given starting point the same composition will always be output. Stochastic processes or randomness can be used within a guided framework so that each time the program is run a different composition is output. Using pseudo random number generators these outputs can be repeated in a deterministic way by seeding the random number generator with the same seed. (Each different seed produces a different sequence of pseudo random numbers.) Knowledge based systems will formulate knowledge about an historical musical style and then output algorithmic compositions that sound like that style. Artificial Intelligence or learning systems are programs that improve their output based on feedback from the composer. Theoretically an AI could listen to its own compositions and improve them based on it's own aesthetic. Then the challenge for the programmer would be to code an aesthetic. One type of AI programming is called genetic programming an evolutionary method where the aesthetic is evolved based on feedback from the composer or other listeners. Hybrid systems use a combination of the above techniques. In the 1980s I read a paper for the ASU Chapter of the ACM where as an example of algorithmic composition I sampled some sax solos by Sonny Rollins and John Coltrane building a data table of all the three note sequences. I would start with an interval created by the first two notes and then search the table for all three note sequences that began with that interval. I then used randomness to select one of these three note sequences so the more common sequences would be selected more frequently. The last two notes of the selected sequence would determine the interval used to select the next note. The output was always different and in fact would sound like Sonny Rollins or John Coltrane on the surface. This technique used sampling, data tables, and randomness so it would be a hybrid system. The output can be a musical score to be played by musicians or a computer file to be played by a synthesizer, or both. In my example above the computer program output the notes directly to the computer speaker without ever saving anything. In addition to note based or event based systems there is also a deeper method of algorithmic composition where the composer uses math to generate the actual wave forms. Using wave form output composition can become divorced from the idea of instruments playing parts. Any moment could contain any possible sound. Listening The first example of algorithmic composition is the “Illiac Suite”, composed by Hiller and Isaacson. Denis L. Baggi says “It is generally recognized that the first piece of music actually written by an electronic computer is the “Illiac Suite” in 1956, so titled in honor of the Illinois Automatic Computer, built at the same university at Urbana-Champaign, one the first high-performance computers.” The piece was composed using a rule based system and it output a score for string quartet. The intent was not to create beautiful music. Instead it was what programmers call a clever hack. The “Illiac Suite” can be heard here on Musicainformatica. http://www.musicainformatica.org/topics/illiac-suite.php Another early practitioner of algorithmic composition was Iannis Xenakis. Here is a Vimeo page featuring his piece, “Atrées for Ensemble” performed in 1962. http://vimeo.com/42061071 The piece definitely has a twentieth century feel. According to his Wikipedia entry he used a variety of math techniques in his compositions. “Specific examples of mathematics, statistics, and physics applied to music composition are the use of the statistical mechanics of gases in Pithoprakta, statistical distribution of points on a plane in Diamorphoses, minimal constraints in Achorripsis, the normal distribution in ST/10 and Atrées, Markov chains in Analogique, game theory in Duel and Stratégie, group theory in Nomos Alpha (for Siegfried Palm), set theory in Herma and Eonta, and Brownian motion in N'Shima.” Aaron Grad does an interesting analysis of “Atrees” on a blog entry at the Seattle Sympohony website. “Atrées, scored for a mixed ensemble of 11 instruments, consists of five sections that can be played in any order, with or without pauses. On a localized level, the musical language consists of swooping, shaking and hovering gestures typical of midcentury modernism. These sound events are like individual molecules, bouncing within the confines established by Xenakis’ statistical calculations. Just as the temperature of a gas is determined by the interactions and collisions of the molecules within, this music changes “temperature” over time, heating and cooling under varying conditions of density and pressure.” Xenakis is an important twentieth century composer and his work was instrumental in moving algorithmic composition into the concert hall. In the late 1980s Kemal Ebcioğlu wrote a knowledge based system called CHORAL designed to write pieces in the style of Bach chorales. Choral used more than 350 rules based on Bach's Chorales, and an Artificial Intelligence framework based on multiple views of the music. This work was done at the IBM Thomas J. Watson Research Center. His biography is here. http://global-supercomputing.com/people/kemal.ebcioglu/bio.html “In a 1989 concert by the Westchester Choral Society, Bach's and the program's chorale harmonizations were sung back to back.” Here is a recording of that concert. http://global-supercomputing.com/people/kemal.ebcioglu/music/1989-01-28-Concert-Chorales.mp3 Bruce Jacob wrote the program variations, an algorithmic composition tool. He says, “The variations architecture has two implementations right now. The first, variations 1 or occam, focuses mostly on the EAR module, and how to use a musical filter to compose music with the least amount of human interaction. The second, variations 2 or nebula, focuses on the COMPOSER module and is concerned with thematic development.” You can hear several of his compositions here. http://www.ee.umd.edu/~blj/algorithmic_composition/ Jazari is a band led by Patrick Flanagan who writes and improvises contemporary electronica. He plays using mostly computer keyboards and switch banks. Everyone else in the band is a robot playing physical instruments. You can hear his piece, “Quick Minute”, on YouTube here. http://youtu.be/rMrk-pZ4RBk The new Jazari album is called “The Human Element” and can be heard on bandcamp here. http://jazari.bandcamp.com/album/the-human-element John Dunn runs the Algorithmic Arts website and he has a page of genetic music. These pieces are not genetic in the AI evolutionary terms described above. They actually are a sampled music with the data sampled from DNA sequences. You can listen here on his page, Genetic Music From DNA and Protein. http://www.algoart.com/music.htm Dmitry Korman has an interesting article called “Fractal Music” where he explains how he uses an iterative technique to create enough fractal density to make the music interesting. http://plus.maths.org/content/os/issue55/features/kormann/index You can listen to the Initial cells and three iterations as well as the final composition at the link above. I have also included printouts of his scores as an addenda. Closing our listening segment here is the output from a commercial algorithmic composition program, Band In A Box. This is a knowledge based system where you can enter a chord change and it will devise an accompaniment and in this case a bebop sax solo. http://upload.wikimedia.org/wikipedia/commons/6/61/BiaB%28bebop%29.ogg These listening examples are designed to give a broad overview of algorithmic composition and are not in any way comprehensive. The Wikipedia article at the top of the bibliography contains many more links to algorithmic compositions and, of course, this remains a dynamic field of study with many new compositions each year. Do It! Back in the olden days of the early 1980s you had to be a computer programmer to experiment with algorithmic composition. This is no longer the case. There are many programs available to composers allowing them to use algorithmic composition in their work without taking a doctorate in math or computer science first. Here is a webpage on the Algorithmic Composer website called “Algorithmic Composition tutorials, thoughts and tools” where you can find short reviews of many algorithmic composition programs many of them available for free download. http://algorithmiccomposer.com/getting-started-with-algorithmic-composition MIT teaches “Music and Technology: Algorithmic and Generative Music” as part of their Open Courseware. http://ocw.mit.edu/courses/music-and-theater-arts/21m-380-music-and-technology-algorithmic-and-generative-music-spring-2010/ The pieces used in teaching this course are available for download at the Internet Archive. http://archive.org/details/MIT21M.380S10/MIT21M_380S10l7_koenig_terminusx.mp3 Over (the top) view The human race could be thought of as a multiprocessor algorithmic composer that learns. Every culture creates music, so it is universal, yet of all our activities it is the most abstract and the least tied to survival. As culture progresses and music evolves each composer is a self directed intelligent unit contributing their part to the musical environment. Algorithmic composition is a logical extension of this with individual intelligences and groups of individual intelligences modeling machines on the shared human experience of music.