Skip to content
generate jazz using lstm
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
ff_midi_songs
herbie_midi_songs
songs
weights
.gitignore
README.md
ff_weights.hdf5
generate.py
train.py
weights-improvement-01-4.7395-bigger.hdf5
weights-improvement-02-4.5792-bigger.hdf5

README.md

lstm-jazz

Generate jazz music using an LSTM neural network.

Setup

$ pip install music21
$ pip install keras
$ pip install numpy 

Usage

  1. 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.
  2. 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.
  3. Run $ python train.py
  4. 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.
  5. In generate.py, line 67: model.load_weights('jazz_weights.hdf5'), set the path to the weights file.
  6. Run $ python generate.py. Your resulting song will be created in the same folder as output_song.mid

Credits

https://github.com/Skuldur/Classical-Piano-Composer

You can’t perform that action at this time.