facebookresearch / audiocraft

Audiocraft is a library for audio processing and generation with deep learning. It features the state-of-the-art EnCodec audio compressor / tokenizer, along with MusicGen, a simple and controllable music generation LM with textual and melodic conditioning.
MIT License
20.31k stars 2.05k forks source link

Train to be a perfect loop #49

Open cacosta88 opened 1 year ago

cacosta88 commented 1 year ago

Train a separate model to perfect the 30-second loop, ensuring it seamlessly folds/loops onto itself. This will make the output easier to use for musicians/producers, even in its current state with all of its limitations.

FurkanGozukara commented 1 year ago

this would be amazing

tmc commented 1 year ago

What would need to go into this?

chavinlo commented 1 year ago

https://github.com/chavinlo/musicgen_trainer done

cacosta88 commented 1 year ago

@chavinlo, it seems to work for the example you provided: Overfit -> Generate -> Decode: https://voca.ro/1f6ru5ieejJY. It does sound like a perfect loop. However, for the Bossa Nova example, it doesn't sound like a 30-second sound that can be seamlessly repeated.

For now, I am actually doing it manually on Ableton, but it takes a long time. I imagine one could train a model using a bunch of perfect loops from https://splice.com/. The target training output would be the original loop or the last few seconds, and the training input would be the original loop with its last second or two chopped off. Then for inference, you would input the imperfect Audiocraft loop, and hopefully, get a perfect loop out of it.