Groove2groove
Code for "Groove2Groove: One-Shot Music Style Transfer with Supervision from Synthetic Data"
Install / Use
/learn @cifkao/Groove2grooveREADME
Groove2Groove
This is the source code for the IEEE TASLP paper:
Ondřej Cífka, Umut Şimşekli and Gaël Richard. "Groove2Groove: One-Shot Music Style Transfer with Supervision from Synthetic Data." IEEE/ACM Transactions on Audio, Speech, and Language Processing, 28:2638–2650, 2020. doi: 10.1109/TASLP.2020.3019642.
If you use the code in your research, please reference the paper.
Links
:microscope: Paper postprint [pdf]
:musical_keyboard: Supplementary website with examples and a live demo
:musical_note: Examples on YouTube
:file_folder: MIDI file dataset, containing almost 3000 different styles
:robot: Band-in-a-Box automation scripts for generating the dataset
:brain: Model parameters (to be extracted into experiments)
Looking around
code: the main codebase (a Python package calledgroove2groove)data: scripts needed to prepare the datasetsexperiments: experiment configuration filesexperiments/eval: evaluation code (see theeval.ipynbnotebook)api: an API server for the web demo
Installation
Clone the repository, then run the following commands.
-
Install the dependencies using one of the following options:
-
Create a new environment using conda:
conda env create -f environment.ymlThis will also install the correct versions of Python and the CUDA and CuDNN libraries.
-
Using pip (a virtual environment is recommended):
pip install -r requirements.txtYou will need Python 3.6 because we use a version of TensorFlow which is not available from PyPI for more recent Python versions.
The code has been tested with TensorFlow 1.12, CUDA 9.0 and CuDNN 7.6.0. Other versions of TensorFlow (1.x) may work too.
-
-
Install the package with:
pip install './code[gpu]'
Usage
The main entry point of the package is the groove2groove.models.roll2seq_style_transfer module, which takes care of training and running the model. Run python -m groove2groove.models.roll2seq_style_transfer -h to see the available command line arguments.
The train command runs the training:
python -m groove2groove.models.roll2seq_style_transfer --logdir $LOGDIR train
Replace $LOGDIR with the model directory, containing the model.yaml configuration file (e.g. one of the directories under experiments).
To run a trained model on a single pair of MIDI files, use the run-midi command, e.g.:
python -m groove2groove.models.roll2seq_style_transfer --logdir $LOGDIR run-midi \
--sample --softmax-temperature 0.6 \
content.mid style.mid output.mid
To run it on a whole pre-processed dataset (e.g. the one in data/bodhidharma), use the run-test command, e.g.:
python -m groove2groove.models.roll2seq_style_transfer --logdir $LOGDIR run-test \
--sample --softmax-temperature 0.6 --batch-size 128 \
content.db style.db keypairs.tsv output.db
Here, keypairs.tsv lists on each line a key from content.db and a key from style.db to use as inputs. Note that content.db and style.db may be the same file.
Acknowledgment
This work has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No. 765068.
Copyright notice
Copyright 2019–2020 Ondřej Cífka of Télécom Paris, Institut Polytechnique de Paris.
All rights reserved.
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
isf-agent
a repo for an agent that helps researchers apply for isf funding
