Can machines create art or music? This is the question that Google Brain’s Magenta project has been actively exploring. Over the last couple of weeks I’ve been playing with various models provided by Magenta to see what kind of musical possibilities Neural Nets have to offer.

Given my background with music, I wanted to see what sounds I could create when training my own Performance RNN model with a bunch of Aphex Twin MIDI files. I then took all of the generated midi files together and tried to randomly construct them into a “song”. Here is a link to the song on soundcloud:

I created my own dataset with 39 MIDI files that I found at and then trained a Performance RNN model while tweaking various hyperparameters in order to get the most interesting sounds.

The songs in the dataset ranged from meditative ambient music to chaotically dense techno with alien rhythms and dynamics. When I was training the model, I saw a bunch of warnings about Key signatures and Time signatures, which makes sense due to how broadly the dynamics ranged between each song. In the end, the model I used to generate my MIDI files had a high loss function (~ 5.5 - 6), but the dynamics looked much more interesting.

When I generated the AFX-RNN MIDI files, I primed the model with a midi file of the middle section of the song “Windowlicker”. I chose this particular midi files since the beat is fairly straight forward and there are simple polyphonic sequences.

Once the new midi files were generated, I imported them into Ableton Live and scattered all 10 files randomly. I then placed various synths and an 808 Drum patch randomly onto the MIDI files and also removed the priming sequence from the beginning of each of the files.

I then messed with the levels and attempted to make an AI generated Aphex Twin track with all 10 generated MIDI files from the Performance RNN model.

Here is a quick video demo of the process:

Deep Learning Aphex Twin from accraze on Vimeo.