https://github.com/salu133445/bmusegan
Code for “Convolutional Generative Adversarial Networks with Binary Neurons for Polyphonic Music Generation”
https://github.com/salu133445/bmusegan
binary-neuron generative-adversarial-network machine-learning multi-track music-generation piano-roll
Last synced: 10 months ago
JSON representation
Code for “Convolutional Generative Adversarial Networks with Binary Neurons for Polyphonic Music Generation”
- Host: GitHub
- URL: https://github.com/salu133445/bmusegan
- Owner: salu133445
- License: mit
- Created: 2018-03-24T06:49:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-22T10:46:53.000Z (over 3 years ago)
- Last Synced: 2025-08-08T20:27:41.375Z (10 months ago)
- Topics: binary-neuron, generative-adversarial-network, machine-learning, multi-track, music-generation, piano-roll
- Language: Python
- Homepage: https://salu133445.github.io/bmusegan/
- Size: 29 MB
- Stars: 59
- Watchers: 5
- Forks: 13
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
BinaryMuseGAN
=============
[BinaryMuseGAN](https://salu133445.github.io/bmusegan/) is a follow-up project
of the [MuseGAN](https://salu133445.github.io/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](https://salu133445.github.io/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](https://salu133445.github.io/bmusegan/results).
Run the code
------------
### Configuration
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).
### Run
```sh
python main.py
```
Training data
-------------
- 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](training_data/download.sh) or
download it manually [here](https://salu133445.github.io/bmusegan/data).
Citing
------
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](https://salu133445.github.io/bmusegan)]
[[video](https://youtu.be/r9C2Q2oR9Ik)]
[[paper](https://salu133445.github.io/bmusegan/pdf/bmusegan-ismir2018-paper.pdf)]
[[slides](https://salu133445.github.io/bmusegan/pdf/bmusegan-ismir2018-slides.pdf)]
[[slides (long)](https://salu133445.github.io/bmusegan/pdf/bmusegan-tmac2018-slides.pdf)]
[[poster](https://salu133445.github.io/bmusegan/pdf/bmusegan-ismir2018-poster.pdf)]
[[arXiv](https://arxiv.org/abs/1804.09399)]
[[code](https://github.com/salu133445/bmusegan)]