EMB96 is an AI (Artificial Intelligence) trained to generate midi.
Each midi file is represented as a 16 piano-roll composed of 96 notes and 96 values. Why 96:
- 8 octaves
- devides almost every scale
The model is a simple VAE (variationnal Auto Encoder) trained to reconstruct a dataset of midi files.
The networks tries to encode the data into a 128 vector
First of all you need midi files. You can use your own files or you could choose to use the same dataset we used as an example.
First, place you data into a single directory. To donwload the example dataset:
cd src
python3 main.py --dataset_dir <dataset dir path> --donwload
Then you need to convert these midi files as images to feed the network:
cd src
python3 main.py --dataset_dir <dataset dir path> --build_dir <build dir path> --build
Accessible for non gpu users, you just have to use the option --cpu
You can train the model just by calling the following command:
cd src
python3 main.py --build_dir <build dir path> --train
If you want to change the training parameters you can. You can access the hole list of parameters using the following:
cd src
python3 main.py --help
Accessible for non gpu users, you just have to use the option --cpu
If you want to try the model:
cd src
python3 main.py --checkpoint <checkpoint path> --n_examples <number of generated midi files> --output_dir <output directory> --test