BinaryMuseGAN is a follow-up project of the MuseGAN project. In this project, we first investigate how the real-valued piano-rolls generated by the generator may lead to difficulties in training the discriminator for CNN-based models. To overcome the binarization issue, we propose to append to the generator an additional refiner network, which try to refine the real-valued predictions generated by the pretrained generator to binary-valued ones. The proposed model is able to directly generate binary-valued piano-rolls at test time.
We trained the network with training data collected from Lakh Pianoroll Dataset. We used the model to generate four-bar musical phrases consisting of eight tracks: Drums, Piano, Guitar, Bass, Ensemble, Reed, Synth Lead and Synth Pad. Audio samples are available here.
Modify config.py
for configuration.
Quick setup
Change the values in the dictionary SETUP
for a quick setup. Documentation
is provided right after each key.
More configuration options
Four dictionaries EXP_CONFIG
, DATA_CONFIG
, MODEL_CONFIG
and
TRAIN_CONFIG
define experiment-, data-, model- and training-related
configuration variables, respectively.
The automatically-determined experiment name is based only on the values defined in the dictionary
SETUP
, so remember to provide the experiment name manually (so that you won't overwrite a trained model).
python main.py
Prepare your own data
The array will be reshaped to (-1, num_bar
, num_timestep
, num_pitch
,
num_track
). These variables are defined in config.py
.
Download our training data with this script or download it manually here.
Please cite the following paper if you use the code provided in this repository.
Hao-Wen Dong and Yi-Hsuan Yang, "Convolutional Generative Adversarial Networks with Binary Neurons for Polyphonic Music Generation," Proceedings of the 19th International Society for Music Information Retrieval Conference (ISMIR), 2018.
[homepage]
[video]
[paper]
[slides]
[slides (long)]
[poster]
[arXiv]
[code]