In particular, Bach’s chorale harmonizations are ripe for systems like artificial intelligence to understand: They always consist of four parts (a melody and three harmonies), are short in duration (about a minute long), and are based off simple melodies that were popular in Lutheran hymns. These consistent traits allowed a deep neural network built by Sony’s Computer Science Laboratories to break down the patterns found between 352 of Bach’s chorales and generate new harmonies.
The machine’s goal isn’t to make an original melody, but instead generate the three supporting harmonies around a supplied melody. It writes each harmony separately, its goal to predict which note Bach himself would write given the preceding note, the notes adjacent in the melody and other harmonies, and the beat the note lands on. Its prediction is made by looking at what Bach did in similar situations, the 352 chorales used to train the AI.
To test if their AI composer could pass for Bach, researchers tested 1,272 people with varying expertise in classical music, giving them examples of Bach’s arrangements and the AI’s. More than 75% of the listeners taking the test were classical music enthusiasts or studied the type of music. The Sony team found that 50% of listeners couldn’t tell the two apart, and the more complex the music sounded, the more often people thought it was composed by Bach. A similar test is available online, and you can try it here. (The author got 7 out of 10 correct, but isn’t bragging.)