Photo by Spencer Imbrock on Unsplash

Can artificial intelligence write pop songs?

AI can’t compose music very well. That doesn’t mean it isn’t useful for musicians.

How easy is it to write a good pop song? Pretty hard when you think about it. Imagine all the elements that go into your favourite hits: melody, rhythm, orchestration, instrumentation, structure (verse and chorus) and more. No wonder computers struggle, even those using the latest advances in machine learning and neural networks.

There have been many attempts to train an algorithm to compose music, but most of these are limited by the number of instruments and track duration.  Even with more mathematical forms of music, such as baroque, AI struggles. Flow Machines, from Sony labs (more later), produced about a minute’s worth of baroque music using a program called DeepBach. Other experiments were less successful.

OpenAI’s Jukebox is more successful. The team at OpenAI set themselves a huge challenge, positioned at the start of the research paper published alongside the announcement:

“In this work, we show that we can use state-of-the-art deep generative models to produce a single system capable of generating diverse high-fidelity music in the raw audio domain, with long-range coherence spanning multiple minutes.”

How good are the results? It all depends on how you approach the question. The best way to describe the tracks is that they sound as if broadcast from a badly tuned AM radio in the 1970s. To a software engineer, who understands the difficulty of the task, it’s pretty impressive. Professional musicians or composers will be less worried that their jobs are at risk.

The most revealing examples occur when the researchers fed the software with the first 12 seconds of a famous song. The system picks up the tune quite well for the next couple of lines, before lurching into a sequence of improvisations that fall short of the original by some distance. Here’s a version of Hotel California, by the Eagles (which veers into thrash metal about one minute in).

So where is AI genuinely useful when it comes to music?

In the right hands, machine learning is a powerful tool that can generate musical elements including melody and orchestration. But it still requires a ‘human-in-the-loop’ to train the model and then assemble different elements into the finished composition.

For example, if you want to train an algorithm to compose elements of a late-period Beatles song, it’s pretty obvious where you need to go to find the training data. Orchestrating acapella folk classics from the 1950s and 1960s requires a bit more imagination.

Both examples, by the way, were led by composer-musician Benoît Carée, with the help of Sony’s Flow Machines platform. The Sony engineers describe the process as ‘augmented creativity’, neatly summing up how AI bolsters, rather than replaces musical ingenuity.

Machine learning opens the door to other commercial opportunities. Spotify has cracked the challenge of isolating vocals and creating instrumental tracks and scale and has since launched a karaoke-style feature in Japan.

It’s also worth pointing out that Spotify had massive advantage because it could train its algorithm by comparing thousands of pairs of instrumental and vocal versions of songs from its library.

The lesson, then, for musicians, as well as many others in the creative fields is clear. An understanding of machine learning, and the toolsthat go with it, will be significant advantage for commercial publishers. AI isn’t about to replace the hit factories of musical history, but it can give you a head start in the pursuit of the next streaming winner.

Meanwhile here’s the OpenAI version of Never Gonna Give You Up, by Rick Astley. As before, this is pretty impressive stuff by machine learning standards. Music lovers might want to give it a miss, however.  

Photo by Spencer Imbrock on Unsplash

Similar Posts

Leave a Reply

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