This is the code for "How to Generate Music - Intro to Deep Learning #9' by Siraj Raval on YouTube
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
midi Add files via upload Mar 11, 2017
LICENSE Add files via upload Mar 11, 2017
NOTICE Add files via upload Mar 11, 2017
README.md Update README.md Mar 11, 2017
generator.py Add files via upload Mar 11, 2017
grammar.py Add files via upload Mar 11, 2017
lstm.py Add files via upload Mar 11, 2017
preprocess.py Add files via upload Mar 11, 2017
qa.py Add files via upload Mar 11, 2017

README.md

How-to-Generate-Music-Demo

This is the code for "How to Generate Music - Intro to Deep Learning #9' by Siraj Raval on YouTube

##Overview

This is the code for this video on Youtube by Siraj Raval as part of the the Udacity Deep Learning Nanodegree. It uses Keras & Theano, two deep learning libraries, to generate jazz music. Specifically, it builds a two-layer LSTM, learning from the given MIDI file.

##Dependencies

##Usage

Run on CPU with command:

python generator.py [# of epochs]

Run on GPU with command:

THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python generator.py [# of epochs]

Note: running Keras/Theano on GPU is formally supported for only NVIDIA cards (CUDA backend).

Note: preprocess.py must be modified to work with other MIDI files (the relevant "melody" MIDI part needs to be selected).

#Coding Challenge - Due Date is Thursday, March 16th 2017 at 12 PM PST

The challenge is to generate your own MIDI file! This code trains off of a single MIDI file and the preprocess.py file manually selects the relevant melody part. Modify it so that it selects the melody from your own MIDI file. Bonus points if you train it on not one, but multiple MIDI files. Through training and testing this code, you'll witness just how powerful LSTM networks are and further understand the generative process. Good luck!

##Credits

The credits for this code go to Ji Sung Kim. I've merely created a wrapper to get people started.