Generate jazz music using an LSTM neural network. See accompanying blog post.
$ pip install music21
$ pip install keras
$ pip install numpy
- Set training data: Create a folder containing midi files, or use one of the ones provided.
ff_midi_songs
contains music from Final Fantasy,herbie_midi_songs
contains music by Herbie Hancock. - In
train.py
, line 20:for f in glob.glob('herbie_midi_songs/*.mid'):
, edit the folder to the folder containing your training set of midi files. - Run
$ python train.py
- Once trained, you'll have a lot of resulting weight files, in the format
weights-improvement-***.hdf5
. The most recent one will be the one you want to use. - In
generate.py
, line 67:model.load_weights('jazz_weights.hdf5')
, set the path to the weights file. - Run
$ python generate.py
. Your resulting song will be created in the same folder asoutput_song.mid
https://github.com/Skuldur/Classical-Piano-Composer