ML for Games Course documentation

Music Generation ๐ŸŽต

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Music Generation ๐ŸŽต

Music Generation offers game developers the ability to create music that perfectly matches the intended mood or atmosphere of the scene.

Udio ๐Ÿ”’๐Ÿ’ธ

Udio is a generative AI model that produces music based on prompts.

Whatโ€™s interesting is that you can generate music instrumental or with lyrics.

For now, you can make 600 daily generations (music)!

Udio can generate excellent music with lyrics; you can check their examples on the website.

But for the game demo Iโ€™m working on for the future unit, where youโ€™re stuck in a ship with aliens, I needed something abstract and uneasy, so I used this prompt: a piece of instrumental music on space void and threatening aliens

And I got this ๐Ÿ‘‰ https://www.udio.com/songs/pYXsK6GsMiwyMd8B3ZEU7R, which this is perfect for my game menu

The model generates 33 seconds of the music, but you can then ask the model to extend it.

If you want to get started with Udio, check this tutorial:

MusicGen ๐Ÿ†“ ๐Ÿค—

This model, made by Meta AI, allows you to generate 15 seconds of music with a text prompt and sound file to help control the style of the music.

I used the same prompt as above and I got this lovely result:

You can try it on Hugging Face Spaces ๐Ÿ‘‰ https://huggingface.co/spaces/facebook/MusicGen

< > Update on GitHub