We want to explore … developing algorithms that can learn how to generate art and music, potentially creating compelling and artistic content on their own.
—Douglas Eck1
In August 2016, the Magenta team at Google unveiled a piece of music which they claimed was the first ever to be entirely composed by a computer. Certainly it was the first to be composed by a computer that had not been in any way programmed to do so. The tune is rather simple but, with the help of a little added percussion, really quite catchy.2
To set the process in motion, Douglas Eck, the head of Project Magenta, fed some 4,500 popular tunes, all digitized, into his computer, then “seeded” it with four musical notes: two Cs and two Gs. The computer then created its little melody.
Like all art, music requires rules. Without boundaries, without structure, it is simply noise. Traditionally the boundaries are the rules for writing a musical score, which are in effect a species of algorithm. As Peter Weibel, CEO of the Center for Art and Media in Karlsruhe and an eminent video and sound artist, says, “Right from the beginning there were algorithms for music.”3 Excitingly, what this means is that music can be programmed.
Besides writing music in the usual way, there have always been ways to assemble scores at random—by throwing dice, for example, using bars from existing scores as the raw material. But the musical fragments always had to be carefully selected to avoid using notes or phrases that couldn’t follow each another according to the rules of composition. Musical games of dice were popular in the eighteenth century and were played by composers such as J. S. Bach’s son, C. P. E. Bach, and by Mozart himself, ever on the lookout for nontraditional ways to compose music. They also gave laypeople the chance to compose music and can be seen as the precursor to machine-composed music.
In the twentieth century, the dice were replaced by Markov chains, a statistical process governing chains of events. Here an event—such as the next musical note—depends only on the previous one.4 In terms of composing music, this meant programming the computer with rules to prevent inharmonious notes or measures following one another. In 1957, Lejaren Hiller, in collaboration with chemist and composer Leonard Issacson, used Markov chains together with rules for composing music to program the ILLIAC computer at the University of Illinois to generate a score for string quartet, which they called The Illiac Suite. This was probably the first score ever composed by a machine. The following year, Greek composer Iannis Xenakis applied Markov chains to hundreds of fragments of magnetic tape and composed two pieces, which he called Analogique A and B.
David Cope, emeritus professor of music at the University of California at Santa Cruz, was the first to apply Markov methods on a grand scale to compose musical scores that faithfully represented particular musical styles, such as those of Bach, Chopin, and Cope himself.
Twenty-first century computers equipped with neural networks can learn the rules of baroque music from Bach’s scores and work out for themselves the probability of one note following another—which was precisely how Project Magenta set its computer to work to produce its little melody.