The pytorch implementation for Conditional RhythmGAN+TransformerKernal
This project is the pytorch implemtation for Conditional Generative Adversarial Network(CGAN) to generate the rhythm. Please cite the original work from Nao Tokui for more detail: https://cclab.sfc.keio.ac.jp/projects/rhythmcan/
The Keras implemntation:https://github.com/naotokui/CreativeGAN-Rhythm
Conditional Generative Adversarial Nets: https://arxiv.org/abs/1411.1784
Besides the LSTM kernal, we are inspired by Attention Is All You Need and provide Transformer kernal via transformer encoder block.
There are two options for training, either Google Colab or your local machine.
Download the dataset
wget https://www.dropbox.com/s/a8mwk8rdv08cu2l/data.zip
unzip data.zip
Configure the environment
pip install -r requirements.txt
sudo apt-get install fluidsynth
Run training script
python main.py --kernal=LSTM
python main.py --kernal=Transformer
Please refer Play_music.ipynb
and Save_music.ipynb
OR, Use the interactive interface: https://github.com/naotokui/M4L-CreativeGAN-Rhythm/