It’s hard not to be blown away by the surprising power of neural networks these days. With enough training, so called “deep neural networks”, with many nodes and hidden layers, can do impressively well on modeling and predicting all kinds of data. (If you don’t know what I’m talking about, I recommend reading about recurrent character-level language models, Google Deep Dream, and neural Turing machines. Very cool stuff!) Now seems like as good a time as ever to experiment with what a neural network can do.
For a while now, I’ve been floating around vague ideas about writing a program to compose music. My original idea was based on a fractal decomposition of time and some sort of repetition mechanism, but after reading more about neural networks, I decided that they would be a better fit. So a few weeks ago, I got to work designing my network. And after training for a while, I am happy to report remarkable success!
It’s certainly very interesting. It’s a slight improvement over Markov chain music. That tends to sound good for any stretch of 5 seconds, but lacks a global structure making it pretty awful to listen to for any longer stretch of time. This music still lacks much of the longer range structures that make music sound like music. It’s a lot like stitching together 5 different Chopin compositions. It is stylistically consistent, but the pieces don’t fit together.
Having said that, it is very interesting to see what you can get out of a network with respect to consonance, dissonance, local harmonic context and timing. I’m most impressed by the rhythm, it sounds more natural to my ear than the note progression.
Composing Music With Recurrent Neural Networks
It’s certainly very interesting. It’s a slight improvement over Markov chain music. That tends to sound good for any stretch of 5 seconds, but lacks a global structure making it pretty awful to listen to for any longer stretch of time. This music still lacks much of the longer range structures that make music sound like music. It’s a lot like stitching together 5 different Chopin compositions. It is stylistically consistent, but the pieces don’t fit together.
Having said that, it is very interesting to see what you can get out of a network with respect to consonance, dissonance, local harmonic context and timing. I’m most impressed by the rhythm, it sounds more natural to my ear than the note progression.
Maybe there are situations where these imperfections of music wouldn’t matter, for example if used as a background music for a computer game.