Google’s first AI-powered Doodle lets you make music like Bach

Even if you think you have no musical ability — or especially if you think that — you can compose a beautiful bit of music today, thanks to AI, Google, and Johann Sebastian Bach.

To celebrate the birthday of Bach, a beloved German composer born on March 31, 1685, Google has launched its first ever AI-powered Doodle. All you have to do is plunk down a few notes and the Doodle will add harmony to them in the signature style of Bach. I’ve got zero formal musical training, but I gave it a try. My little composition came out sounding surprisingly great!

It’s not really surprising, though, if you know a bit about machine learning, the process Google used to make this possible. Machine learning is a type of AI that involves feeding computers example after example of something, until they “learn” to create their own example — without ever having been given explicit instructions to follow.

In this case, 306 chorale harmonizations composed by Bach were fed into a model. His chorales make for great training data because their structure is pretty consistent and concise — they all contain four voices, which take on a pleasing depth when layered on top of one another. After the model “learned” Bach’s style by picking out the patterns, the machine learning system was refitted to run within the confines of your humble web browser.

As a result, you can make your own Bachian music with just a few quick clicks. So go on, give it a whirl!

In addition to being a fun exercise, the Google Doodle is also a handy tool for busting two persistent myths. First is the idea that music is an innate talent, and you’ve either got it or you don’t. Despite what many of us were unfortunately told as kids, there’s no such thing as an “unmusical” person. Anyone can develop musical skills. This Doodle — which explains what harmony is, shows you exactly what goes into creating it, and then lets you hear how good your own notes can sound with just a little support — helps drive that lesson home.

Second is the idea that using AI to create music is somehow “cheating.” It’s a notion you’ll hear voiced by self-described music purists as they grapple with the fact that AI technology is increasingly being used to generate songs — and those songs might even be good enough to top the charts one day. This feeds into a broader fear that AI may change the way human creativity is valued, possibly even replacing human pros.

That adversarial framing was on view earlier this month at London’s Barbican, where an experimental concert pitted an AI trained on Bach against good old Johann Sebastian. Though this wasn’t a competition with an explicit winner and loser, Barbican did ask the audience questions like “Could an algorithm ever write music to rival Bach?” and “Will you be able to tell the difference?”

But rather than thinking about AI and humans as rivals, we can imagine a collaborative relationship. Some musicians are already using AI tools to help them in their music-making process. Last year, the pop artist Taryn Southern used the AI platform Amper Music to create her debut album, I AM AI. In 2016, Alex da Kid co-created the song “Not Easy” using IBM’s Watson Beat, earning him a spot on the Billboard chart.

And way back in ye olde 1990s, Davie Bowie helped develop the Verbasizer app, which took inputted words and randomly reorganized them, yielding creative combinations that he used in his lyrics. “What you end up with,” he explained in a 1997 documentary, “is a real kaleidoscope of meanings and topic and nouns and verbs all sort of slamming into each other.”

The Google Doodle, in its own small way, gives us a taste of that collaborative process.

Sign up for the Future Perfect newsletter. Twice a week, you’ll get a roundup of ideas and solutions for tackling our biggest challenges: improving public health, decreasing human and animal suffering, easing catastrophic risks, and — to put it simply — getting better at doing good.