Simple implementation of Piano Music Generation with several Transformer architectures using Midi Tokenization.
- Vanilla (code)
- GPT (code)
- Music Transformer (Google Brain, 2018) (code)
- Museformer (Microsoft Research, 2022) (code)
(Will continue to study, analyze, improve, and update!)
We used MAESTRO dataset which is consist of about 200 hours of piano music.
By using Anaconda Environment,
$ conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
$ pip install -r requirements.txt
$ python train.py
$ python generate.py
Generated results will be located in gen_res folder and the Visualized Image will be saved in img folder.
You can choose sample what you satisfy among the great number of results.