OpenAI’s MuseNet is a new online tool that uses AI to generate songs with as many as 10 different instruments. Not only that, but it can create music in as many as 15 different styles, imitating classical composers like Mozart, contemporary artists like Lady Gaga, or genres like bluegrass or even video game music. You can give it a short segment of music to get it started or have it start from scratch.

MuseNet works by using a deep neural network that’s been trained on a dataset of MIDI files gathered from a range of online sources that cover jazz, pop, African, Indian, and Arabic styles of music. The researchers behind the project say that the system is able to pay attention to music over long periods of time, meaning it’s able to understand the broad context of a song’s melodies, rather than just how they flow together in a short section. With this data, the system is tasked with predicting the next note in a sequence.

Asking for ‘Harry Potter’ music in the style of a video game soundtrack produced some nightmarish results

When you try it out for yourself, you can hear this approach at work. Give MuseNet a short bit of music to get it started, and it will initially follow the style quite closely. However, as the music goes on, the AI’s predictions gradually veer more and more from the original. When I had it write the ending of the Harry Potter theme in the style of a video game soundtrack, it eventually descended into the stuff of nightmares.

The software is just the latest project from OpenAI, which recently made headlines for producing an AI that was capable of beating a world champion e-sports team at Dota 2. The same AI was then let loose on the Dota-playing public, with devastating results. OpenAI’s other projects have been able to write convincingly by ingesting huge numbers of articles, blogs, and websites.

OpenAI isn’t the first company to experiment with AI-generated music. Taryn Southern released an album composed entirely using AI back in 2017, and other musicians are increasingly experimenting with using artificial intelligence in their composing process. But this new wave of AI composing poses some complicated legal problems about who owns the rights to the music, and the problem is only going to get worse as tools like MuseNet lower the barrier to entry of AI composing.

MuseNet is available to try out now on OpenAI’s site, where you can also listen to a selection of songs the team has already generated and read about how the system works. TechCrunch reports that the generator will stay online until around mid-May, after which point, it will eventually be partially open-sourced.