Can Algorithms Dream Up Bach Chorales? DeepBach Says Yes

Tuesday, December 20, 2016 - 11:57 AM

J.S. Bach's composing style is being recreated by computer algorithm. (Mike Rinzel)

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.


More in:

Comments [13]

menorah Rotenberg from Teaneck, NJ

sounded "tinny"

Jan. 04 2017 06:42 PM
Ferdinand Gajewski from NJ

Here's an example of Bach's style, the work of human hands:

Dec. 30 2016 08:34 PM
Ferdinand Gajewski from NJ

Oh dear. My previous post requires many errata. So here it is again LOL. In the 60s my Harvard counterpoint students were simultaneously playing with computers and Bach. They had the brainstorm to try to compose examples of two-part (maybe it was four-part) counterpoint in Bach's style via computer. The results were atrocious. Yet they insisted "the real Bach could now be relegated to the trash pile of history."

Dec. 30 2016 08:27 PM
Ferdinand Gajewski

In the 60s my Harvard counterpoint student were simultaneous playing with computers and Bach. They had the brainstorm to try to cponse two=partm(maybe it was our-part) ounterpoint in Bach;s style via computer.

Dec. 30 2016 08:16 PM
Ivan Guevara from New York City

Doesn't sound like authentic Bach to me. The giveaway is that some of the harmonic
resolutions in the counterpoint are not what Bach would have written. This rendering
sounds like a beginner's counterpoint exercise that sounds somewhat like Bach. Give
me the real J.S. Bach any day. Trust me on this - I am a classically trained organist who has played more than a bit of Bach and hope to continue till well, you

Dec. 28 2016 09:22 PM
George from Teaneck, NJ

While not an expert, just a classical music lover, I can't say with the sophistication of a music professor. I do know you can be taught to "write music like Mozart" if you follow certain rules. So why not an algorithm for generating such music?

It does sound quite nice.

Dec. 27 2016 03:28 PM
Eric from Bangkok

Not convincing to my ear. One of the fermatas was completely ignored. The sequence of the melodies was poor. Bach's genuine chorales have a sense of movement towards a destination. This artificial "chorale" doesn't. In music theory class we analysed all of Bach's chorales so I'm familiar with the complete Chorale Book.

Dec. 26 2016 09:30 AM
Ruth Shoenthal from Manhattan

Sounds more like Thomas Tallis to me. To be honest, from 12/23 1 am to 12/31 @ 11:59 pm, I'll be listing all day & night to Bach on WKCR. Perfection!

Dec. 24 2016 12:08 PM
David from Flushing

Handel is my favorite composer, yet I have come to be intolerant of Bach. Bach always reminds me of log tables---neat, predictable, and not knowing when to stop. By comparison, Handel smiles at us.

Dec. 22 2016 01:54 PM
Aaron Isquith from Brooklyn

As music students, we were asked to compose in the style of. That a computer algorithm is doing this only means that the computers are many years behind the average music student. As a musicologist, I'm not impressed.

Dec. 21 2016 06:47 PM


Dec. 21 2016 12:53 PM
Paul from Brooklyn, NY

Sounds like a counterpoint exercise.

Dec. 21 2016 11:31 AM
Marc from Philadelphia

To be honest, I'd rather not listen to either BWV 227 or DeepBach.

Dec. 20 2016 05:17 PM

Leave a Comment

Email addresses are required but never displayed.

The WQXR e-newsletter. Show highlights, links to music news, on-demand concerts, events from The Greene Space and more.

Follow WQXR 







About WQXR Blog

Read WQXR's coverage of classical music news, trends, commentary and more here at the WQXR Blog.