Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 966 Bytes

File metadata and controls

17 lines (13 loc) · 966 Bytes

MIDI File LSTM & GAN

Using LSTMs and GANs to Generate Music from MIDI Files (APM Fall 2018)

Requirements:

  • Python 3.x
  • GPU compatible with the CuDNN Keras sequential model layers
  • Installation of the following packages:
    • Music21
    • Keras
    • Tensorflow

LSTM

For creating an LSTM to generate music, run lstm.py. This will parse all of the files in the Pokemon MIDI folder and train an LSTM model on them. The model will then be used to predict on a random sequence of notes from within the input data and a .mid file will be created.

GAN

For creating a GAN to generate music, run mlp_gan.py. This will parse all of the files in the Pokemon MIDI folder and train a GAN model on them, with an LSTM-based discriminator and an MLP-based generator. After training, the generator will be fed random noise to make an output that will be converted into a .mid file using Music21. A plot of the discriminator and generator loss will also be saved.