Skip to content

feat(music): add structured flags for music generation#34

Merged
MiniMax-AI-Dev merged 2 commits intoMiniMax-AI:mainfrom
raylanlin:feat/music-structured-flags
Apr 6, 2026
Merged

feat(music): add structured flags for music generation#34
MiniMax-AI-Dev merged 2 commits intoMiniMax-AI:mainfrom
raylanlin:feat/music-structured-flags

Conversation

@raylanlin
Copy link
Copy Markdown
Collaborator

@raylanlin raylanlin commented Apr 6, 2026

Summary

Add 14 structured flags to music generate command. All flags are merged into --prompt before the API call — no new API parameters, just structured helpers.

Source

Inspired by the skill script generate_music.sh which has the same structured parameters (--genre, --mood, --tempo, --bpm, --key, --instruments, --vocals, --use-case, --structure, --avoid, --references) and the same prompt-concatenation logic.

New Flags

Flag Description Example
--vocals Vocal style "warm male baritone", "bright female soprano", "duet with harmonies"
--genre Music genre folk, pop, jazz
--mood Mood/emotion warm, melancholic, uplifting
--instruments Instruments "acoustic guitar, piano"
--tempo Tempo description fast, slow, moderate
--bpm Exact BPM 95
--key Musical key C major, A minor
--use-case Use case context "background music for video"
--structure Song structure "verse-chorus-verse-bridge-chorus"
--references Reference tracks "similar to Ed Sheeran"
--avoid Elements to avoid "electronic beats"
--instrumental Pure music flag --instrumental
--aigc-watermark Embed AI watermark --aigc-watermark
--extra Additional requirements (CLI exclusive) "verse 1 male solo, chorus layered harmonies"

Why --extra (CLI Exclusive)

The 12 skill flags cover fixed categories, but real music generation often needs details that don't fit those categories:

  • verse 1 male solo, verse 2 female solo, chorus with harmonies
  • bridge builds tension with rising intensity
  • guitar solo with blues slide technique

--extra is an open-ended catch-all for these fine-grained requirements.

Breaking Changes

  • --instrumental and --lyrics are now mutually exclusive (conflicting intent)
  • Use --lyrics "无歌词" or --lyrics "no lyrics" for instrumental instead
  • --lyrics-file also conflicts with --instrumental

Testing

9 tests in test/commands/music/generate.test.ts, all passing.

Raylan LIN added 2 commits April 6, 2026 10:48
Add 14 structured flags to music generate command for better UX:

--vocals      : Vocal style (e.g. "warm male and female duet")
--genre       : Music genre (e.g. folk, pop, jazz)
--mood        : Mood or emotion (e.g. warm, melancholic)
--instruments : Instruments to feature
--tempo       : Tempo description (e.g. fast, slow)
--bpm         : Exact tempo in beats per minute
--key         : Musical key (e.g. C major, A minor)
--use-case    : Use case context (e.g. "background music")
--structure   : Song structure
--references  : Reference tracks/artists
--avoid       : Elements to avoid
--extra       : Additional fine-grained requirements
--instrumental: Generate instrumental music (no vocals)
--aigc-watermark: Embed AI watermark for provenance

Breaking changes:
- --instrumental and --lyrics are now mutually exclusive
- Use --lyrics "无歌词" or --lyrics "no lyrics" for instrumental

This provides full parity with skill's generate_music.sh plus one
extra flag (--extra) for any additional requirements.
Add clearer examples showing valid vocal descriptors:
- "warm male baritone" (single voice)
- "bright female soprano" (single voice)
- "duet with harmonies" (multiple voices)

This helps users understand what kind of descriptors the model responds to.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants