autodrummer
autodrummer copied to clipboard
A text-to-audio model for generating text-conditioned drum beats
autodrummer
A text-to-audio model for generating text-conditioned drum beats.
how it works
autodrummer is a transformer model created by converting the MIDI data from Google Magenta's E-GMD dataset to a specialized variant of plaintext upon which to train a transformer. This repo covers everything necessary to convert the raw MIDI data from E-GMD into tokens for the transformer.
installation
- Download the E-GMD dataset and place it in this repo in a folder named
e-gmd git clone https://github.com/angelfaraldo/pymidifilewithin this repo and replace itsquantize.pywith this repo's version ofquantize.py. you have to run quantize.py from the autodrummer repo directory, not the pymidifile repo directory, or else you'll get import errors.- run
pip install -r requirements.txt
current workflow (to prepare data for your own finetune)
pymidifile/quantize.py: quantize the MIDI data in the e-gmd dataset and convert it to matrices representing(drum_code, hit_time)pairsmatrix2text.py: convert said matrices into plaintextdf2jsonl.py: convert dataframe of plaintext tojsonlfile- train model here
txt2audio.pyorevaluator.py: convert back from plaintext to audio