2 June , 2025

Automatic Composition

Using Recurrent Neural Networks and Metric Structure

As part of my Masters in Computer Science at the University of Montréal in 2004–2005, I treated the subject of automatic music composition. Using machine learning techniques, my algorithm was able to compose new songs in the same style as the songs used to train the algorithm.

For more details on the techniques used, my master’s thesis is available in PDF (memoire.pdf in French).

You can download a few songs composed by my algorithms. There are three sets of experiments: “Walking bass,” “Songs” and “Songs and chords.” Finally, the training sets used for each of the experiments are available for download.

Walking bass

Representation1 block - 1 cell2 blocks - 1 cell / block
Locallstm_1_1_local.midlstm_2_1_local.mid
Shepardlstm_1_1_shep.midlstm_2_1_shep.mid
Frequencylstm_1_1_freq.midlstm_2_1_freq.mid
Metric structure—Locallstm_1_1_sm_local.midlstm_2_1_freq.mid
Metric structure—Shepardlstm_1_1_sm_shep.midlstm_2_1_sm_shep.mid
Metric structure—Frequencylstm_1_1_sm_freq.midlstm_2_1_sm_freq.mid

Songs

ModelRepresentationDownload
LSTM 2 blocks - 2 cells / block
0 hidden unit
Local (with metric structure)lstm_meter_local_b2c2h0.mid
lstm_meter_local_b2c2h0.mp3
LSTM 2 blocks - 2 cells / block
16 hidden units
Shepard (with metric structure)lstm_meter_shep_b2c2h16.mid
lstm_meter_shep_b2c2h16.mp3

Songs and chords

ModelRepresentationDownload
LSTM 2 blocks - 2 cells / block
16 hidden units
Local (with metric structure)lstm_meterlocal_b2c2h16.mid
lstm_meterlocal_b2c2h16.mp3
LSTM 2 blocks - 2 cells / block
0 hidden unit
Frequency (with metric structure)lstm_meterfreq_b2c2h0.mid
lstm_meterfreq_b2c2h0.mp3

Training sets

ModelDownload
Walking basstrain_wb.tar.gz
Songsthesession.tar.gz
Songs and chordsnottingham.tar.gz