Skip to content

MCLYang/RhythmGAN_pytorch

Repository files navigation

RhythmGAN_pytorch

The pytorch implementation for Conditional RhythmGAN+TransformerKernal

alt text

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.

Training

There are two options for training, either Google Colab or your local machine.

Google Colab
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

Inference, Play music and Save them

Please refer Play_music.ipynb and Save_music.ipynb

OR, Use the interactive interface: https://github.com/naotokui/M4L-CreativeGAN-Rhythm/

About

The pytorch implementation for RhythmGAN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published