Media MusicGen
Context: $ARGUMENTS
Quick start
- Quick background music (MIT, fully free):
scripts/musicgen.py generate --model riffusion --prompt "lo-fi hip-hop beat" --duration 10 --out out.wav→ Step 3 - Full song with vocals:
scripts/musicgen.py generate --model yue --prompt "emotional indie rock, male vocalist, 80 bpm" --duration 90 --out song.wav→ Step 3 - Higher-quality 44.1kHz stereo:
scripts/musicgen.py generate --model stable-audio-open --prompt "ambient cinematic strings" --duration 47 --out out.wav→ Step 3 (read LICENSES.md first) - Continue an existing idea:
scripts/musicgen.py continue --in sketch.wav --prompt "build into chorus" --duration 20 --out extended.wav→ Step 4 - Split generated music into stems:
scripts/musicgen.py stems --in out.wav --out-dir stems/→ Step 5 (hands off tomedia-demucs)
When to use
- Generate royalty-free background music for video, podcasts, games
- Prototype song ideas or jingles from a text description
- Produce a full song with AI-generated vocals (YuE only)
- Extend an existing musical idea by feeding it as continuation prompt
- Build AI-music pipelines that stay commercial-safe
Do NOT use this skill for:
- MusicGen / AudioCraft — EXCLUDED, CC-BY-NC weights despite MIT code
- Suno / Udio — commercial paid APIs, not open-source
- Lyria / MusicLM — Google proprietary, not open-weights
- Research-only models (Jukebox, MuseNet, etc.)
Step 1 — Pick a model
| Task | Recommended | License | Commercial use? | Vocals? |
| ------------------------------------------ | ----------------- | ----------------------------------------------- | ---------------------------- | ------- |
| Any, lowest friction, fully permissive | Riffusion | MIT | Yes, unconditionally | No |
| Full song with vocals, best 2025 quality | YuE | Apache 2.0 | Yes, unconditionally | Yes |
| Highest audio quality, instrumental | Stable Audio Open | Stability AI Community License | Yes, up to $1M annual revenue | No |
Full license audit (including excluded models and Stable Audio's $1M ARR cap) in