[David] Cope emptied Santa Cruz’s libraries of books on artificial intelligence, sat in on classes and slowly learned to program. He built simple rules-based software to replicate his own taste, but it didn’t take long before he realized the task was too difficult. He turned to a more realistic challenge: writing chorales (four-part vocal hymns) in the style of Johann Sebastian Bach, a childhood favorite. After a year’s work, his program could compose chorales at the level of a C-student college sophomore. It was correctly following the rules, smoothly connecting chords, but it lacked vibrancy. As AI software, it was a minor triumph. As a method of producing creative music, it was awful. . .
So Cope developed his own types of musical phenomena to capture each composer’s tendencies — for instance, how often a series of notes shows up, or how a series may signal a change in key. He also classified chords, phrases and entire sections of a piece based on his own grammar of musical storytelling and tension and release: statement, preparation, extension, antecedent, consequent. The system is analogous to examining the way a piece of writing functions. For example, a word may be a noun in preparation for a verb, within a sentence meant to be a declarative statement, within a paragraph that’s a consequent near the conclusion of a piece.
Finally, Cope’s program could divine what made Bach sound like Bach and create music in that style. It broke rules just as Bach had broken them, and made the result sound musical. It was as if the software had somehow captured Bach’s spirit — and it performed just as well in producing new Mozart compositions and Shakespeare sonnets.