# Generating MIDI music ## Structure of this project /data - directory for all MIDI files encoding.py - functions that convert the musical composition between different formats generate.py - script for generating new music /generated_midi - directory that holds generated music make_corpus.py - script that creates a text corpus from the MIDI files midi_report.pdf - documentation of the project models.py - architectures of the used neural network models /model_weights - model weights are stored here during and after training; contains weights of pretrained models requirements.txt - required libraries /survey_samples - generated samples that were used in a user survey for evaluation test_corpus.txt - corpus for final evaluation train.py - script for training the models train_corpus.txt - training data for the models ## Usage ### Make corpus $ ./make_corpus.py Takes all MIDI files in all sub-directories of ./data and creates a single corpus file. ### Train models $ ./train.py Trains the three implemented models (simple lstm, lstm, cnn-lstm) on the train_corpus. This may take several days to finish even on a powerful computer. ### Generate MIDI $ ./generate.py Generates new MIDI files which will be stored in the ./generated_midi folder. Uses all three models and generates 20 samples with each by default.