James Bennett II is a staff writer for WQXR.
Can Algorithms Dream Up Bach Chorales? DeepBach Says Yes
Tuesday, December 20, 2016 - 11:57 AM
Bach’s personal philosophy must have been something along the lines of “if you’re going to do something, do a lot of it.” It’s the only way to explain the number of children he sired (20), and the incredible number of short chorale pieces he wrote: several hundred, 209 of which survive. It’s the music that is the subject of an interesting musical project by Gaetan Hadjeres and François Pachet of Sony Computer science laboratories. The Paris-based team is teaching a computer to construct harmonies in the style of Bach’s chorale cantatas.
Why Bach? Because those chorales, while complex, follow his own strict set of rules that would be easier to teach a machine than, say, a Schoenberg. The music, written for four voices, is carried by a melody in the highest voice. The remaining three form the harmony that gives the music the Bach-like sounds that we crave. If you needed a refresher on what that sounded like, check it out in action below.
Hadjeres and Pachet are using an algorithm to construct harmonies that fit right into that mold.
They transposed the Bach chorales and cantatas into a number of different keys, giving their program — unsurprisingly called DeepBach — 2,503 total pieces of music to work with. As one would expect, listening to that much music on repeat means the program got really good at determining what sounded like Bach and what didn’t. So when it began to produce its own harmonies, it fared much better than previously similar attempts at AI music production. Of the 1,600 people surveyed — over a quarter of whom were professional musicians or music students — about half identified DeepBach as RealBach.
There are some interesting implications that follow. Programs like this can bring an all-new dimension to the study of classical music and could be applied to other types of music, as well. Maybe we’ll one day see it in action for reconstructing musical sketches and fragments, too.
Take a listen to one of the DeepBach pieces, and tell us what you think.