Generative music with Machine learning

 

This project was an attempt at using machine learning techniques to generate new musical passages in midi format. It uses a Restricted Boltzmann Machine and TensorFlow to predict the likelihood of any given note at any given time being either on or off. See the Github repo below for the full code and to try the project for yourself. For full details, methodology, and results of the project, please refer to the full paper linked below.

Multi-track midi file

Trained on MIdi

By using multi-track midi files, the model learns what notes should be playing at any given moment in time, and then outputs new midi files based on the input files.

Diagram of a Restricted Boltzmann Machine

Built on a restricted boltzmann machine

A Restricted Boltzmann Machine is a form of artificial neural network designed to learn a probability distribution from its inputs. Basically, it calculates the probability of a node (or note, in this case) being played at any given moment in time based on the input data.

results

Overall, results were disappointing. Given enough training time, results would be much more acceptable, but the time to converge based on the dataset used in this project was likely measured in days. Because the project was trained on complicated multi-track midi files, the number of possibilities at any given moment in time were very high, making the time to convergence quite long. Please see the full paper for a more detailed discussion of this limitation and thoughts on how to make the model better.