{"id":15580429,"url":"https://github.com/salu133445/bmusegan","last_synced_at":"2025-08-16T18:10:20.334Z","repository":{"id":111841039,"uuid":"126573745","full_name":"salu133445/bmusegan","owner":"salu133445","description":"Code for “Convolutional Generative Adversarial Networks with Binary Neurons for Polyphonic Music Generation”","archived":false,"fork":false,"pushed_at":"2022-09-22T10:46:53.000Z","size":30431,"stargazers_count":59,"open_issues_count":4,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-08T20:27:41.375Z","etag":null,"topics":["binary-neuron","generative-adversarial-network","machine-learning","multi-track","music-generation","piano-roll"],"latest_commit_sha":null,"homepage":"https://salu133445.github.io/bmusegan/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salu133445.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"salu133445"}},"created_at":"2018-03-24T06:49:32.000Z","updated_at":"2025-03-13T04:42:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5916c23-68d6-46e7-ba27-56e903a69fa3","html_url":"https://github.com/salu133445/bmusegan","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/salu133445/bmusegan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salu133445%2Fbmusegan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salu133445%2Fbmusegan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salu133445%2Fbmusegan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salu133445%2Fbmusegan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salu133445","download_url":"https://codeload.github.com/salu133445/bmusegan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salu133445%2Fbmusegan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270749549,"owners_count":24638756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-neuron","generative-adversarial-network","machine-learning","multi-track","music-generation","piano-roll"],"created_at":"2024-10-02T19:25:41.123Z","updated_at":"2025-08-16T18:10:20.308Z","avatar_url":"https://github.com/salu133445.png","language":"Python","funding_links":["https://github.com/sponsors/salu133445"],"categories":[],"sub_categories":[],"readme":"BinaryMuseGAN\n=============\n\n[BinaryMuseGAN](https://salu133445.github.io/bmusegan/) is a follow-up project\nof the [MuseGAN](https://salu133445.github.io/musegan/) project. In this\nproject, we first investigate how the real-valued piano-rolls generated by the\ngenerator may lead to difficulties in training the discriminator for CNN-based\nmodels. To overcome the binarization issue, we propose to append to the\ngenerator an additional refiner network, which try to refine the real-valued\npredictions generated by the pretrained generator to binary-valued ones. The\nproposed model is able to directly generate binary-valued piano-rolls at test\ntime.\n\nWe trained the network with training data collected from\n[Lakh Pianoroll Dataset](https://salu133445.github.io/lakh-pianoroll-dataset/).\nWe used the model to generate four-bar musical phrases consisting of eight\ntracks: _Drums_, _Piano_, _Guitar_, _Bass_, _Ensemble_, _Reed_, _Synth Lead_ and\n_Synth Pad_. Audio samples are available\n[here](https://salu133445.github.io/bmusegan/results).\n\nRun the code\n------------\n\n### Configuration\n\nModify `config.py` for configuration.\n\n- Quick setup\n\n  Change the values in the dictionary `SETUP` for a quick setup. Documentation\n  is provided right after each key.\n\n- More configuration options\n\n  Four dictionaries `EXP_CONFIG`, `DATA_CONFIG`, `MODEL_CONFIG` and\n  `TRAIN_CONFIG` define experiment-, data-, model- and training-related\n  configuration variables, respectively.\n\n  \u003e The automatically-determined experiment name is based only on the values\ndefined in the dictionary `SETUP`, so remember to provide the experiment name\nmanually (so that you won't overwrite a trained model).\n\n### Run\n\n```sh\npython main.py\n```\n\nTraining data\n-------------\n\n- Prepare your own data\n\n  The array will be reshaped to (-1, `num_bar`, `num_timestep`, `num_pitch`,\n  `num_track`). These variables are defined in `config.py`.\n\n- Download our training data with this [script](training_data/download.sh) or\n  download it manually [here](https://salu133445.github.io/bmusegan/data).\n\nCiting\n------\n\nPlease cite the following paper if you use the code provided in this repository.\n\nHao-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.\u003cbr\u003e\n[[homepage](https://salu133445.github.io/bmusegan)]\n[[video](https://youtu.be/r9C2Q2oR9Ik)]\n[[paper](https://salu133445.github.io/bmusegan/pdf/bmusegan-ismir2018-paper.pdf)]\n[[slides](https://salu133445.github.io/bmusegan/pdf/bmusegan-ismir2018-slides.pdf)]\n[[slides (long)](https://salu133445.github.io/bmusegan/pdf/bmusegan-tmac2018-slides.pdf)]\n[[poster](https://salu133445.github.io/bmusegan/pdf/bmusegan-ismir2018-poster.pdf)]\n[[arXiv](https://arxiv.org/abs/1804.09399)]\n[[code](https://github.com/salu133445/bmusegan)]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalu133445%2Fbmusegan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalu133445%2Fbmusegan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalu133445%2Fbmusegan/lists"}