Johann Sebastian Bach Google Doodle uses AI to create Music

Johann Sebastian Bach Google Doodle uses AI to create Music

The search engine Google is showing this Doodle
in many Countries for celebrating Johann Sebastian Bach
Johann Sebastian Bach was a German composer and musician. It is Google’s first ever AI-powered Doodle. The Doodle is an interactive experience encouraging
players to compose a melody of their choice. With the press of a button, the Doodle then
uses machine learning to harmonize the custom melody into Bach’s signature music style
(or a Bach 80’s rock style hybrid if you happen to find a very special easter egg in the Doodle…:)). This Doodle is developed by creating a machine
learning model. Machine learning is the process of teaching
a computer to come up with its own answers by showing it a lot of examples, instead of
giving it a set of rules to follow as is done in traditional computer programming. The Moedel was trained on 306 of Bach’s
chorale harmonizations. His chorales always have four voices, each
carrying their own melodic line, while creating a rich harmonic progression when played together. This concise structure made them good training
data for a machine learning model. Then they used TensorFlow.js to allow machine
learning to happen entirely within the web browser. For cases where someone’s computer or device
might not be fast enough to run the Doodle using TensorFlow.js, the Doodle is also served
with Google’s new Tensor Processing Units (TPUs), a way of quickly handling machine
learning tasks in data centers— yet another Doodle first! These components, combined with art and engineering
from the Doodle team, helped create what you see today.


  1. The results of this algorithm are very disappointing. Lots of mistakes and often pure musical nonsense. Obviously it would have been better not to use AI but just the simple rules of harmony. They work perfectly well for this kind of simple four-part harmonizations in the style of Bach. Any average music student can do better.

  2. Love this! As a teacher of music theory, I would love to have this entire program to use for my student demonstrations of how 4 part harmony is developed. J S Bach basically wrote the original rules we use today for point/counter point harmony and I have often thought, "Gee wouldn't it be nice if we had a program that would allow students to write the melody and have an assist on the harmonies to produce a complete piece." Well you guys did it! (Yes it is not perfect yet and does need some work. But what software doesn't? ) Way to go! And thanks.

  3. I would have liked to play with this but it just says "Harmonizing…" for over an hour at a time – not one result!

  4. just try to create a little music, Google Doodle is amazing…..

  5. what a wonderful surprise to discover this AI bach thing!….I played with it for ages….is it available to use as a standalone device?…..where can I get it?….I simply must have it for my own!!!!!!

  6. I entered a simple cadence in C : A6 G6 F6 E6 E6 D6 C6 (implied minim) – two bar phrase. Unfortunately your algorithm takes merely a 'low level' view of Bach and cannot identify the strong subdominant to dominant (buttressed by median) undertow of this elementary phrase. As the A is essentially a slow passing-note, it has to be harmonized with reference to its ultimate trajectory; and not per se. The system chose to harmonize it with an ugly E2 in the bass; I would have stayed in the treble and written Bass, Tenor and Alto all up in octave 5, with a quavers A, B in the Alto; followed by suspension D, C – also quavers – on the second crotchet to harmonize the G6; the Alto would have run [quavers] A B D C….like so. Thus there are at least three typical conditions for Bach not addressed: (1) in real baroque counterpoint, you may jump up to two and a half octaves and remain idiomatic (2) you cannot have naked fourths spread over several octaves, as I was given (3) you need the quavers to be fitted in at cadential moments, not just randomly (4) you need an overal sense of I IV V resolutions in classical harmony.

  7. I played with the AI. Unfortunately it does not let you input a key and provides some weird, tonally ambiguous results. I wonder how many actual music theorists/bach enthusiasts they were in contact with when creating this.

  8. The program is supposed to work from a base of 306 chorale harmonizations. Unfortunately, that doesn't seem to include any of the six Bach wrote for 'O Haupt voll Blut und Wunden' in the Matthew Passion, since the machine failed to recognize the opening line of the melody. But then it was totally foxed by a string of repeated tonic crotchets (quarter notes) followed by a leading note and a final tonic. Looks like we need to add some rules rather than relying on blind pattern recognition.

  9. What the algorithms are doig its copyng a Bach to create a song based on bach, they dont create music from nothing, everything i have seen ai do copy, i want to see them create something from nothing, to me only Humans could do that, and its a constant and not a variable…

Add a Comment

Your email address will not be published. Required fields are marked *