Compose music
Composer returns a finished track and one stem per instrument.
Composer makes music from a text description. It returns a finished track (the master, an mp3) and one stem per instrument (MIDI).
song = catalyst.composer.compose("warm lo-fi, vinyl crackle, 80 bpm", effort="low", duration=60)
song.master # the finished mp3 track
song.stems # one MIDI part per instrument
song.stem("Grand Piano") # one stem by name (case does not matter)
song.data["bpm"], song.data["key"], song.data["genre"]Options
| Option | Type | Limits | What it does |
|---|---|---|---|
prompt | string | 1 to 8000 characters, required | The music you want: mood, genre, instruments, tempo. |
model | string | composer-omni-2.5 (default), composer-omni-2.0, wave-composer-omni-v1, wave-composer-pulse-v1 | The Composer model. composer-omni-2.0 is served by 2.5. |
effort | string | low (default) or medium (mid also accepted) | medium adds the symbolic note model and takes longer. |
duration | number | above 0, at most 300 seconds | Target length. |
session_id | string | see Sessions | Which session the files belong to. |
About output formats
compose has no format option, because a composition is always an mp3 master plus MIDI stems. You choose the format when you download: wav, flac or ogg for the master, and for stems mid (the notes, default) or rendered audio. See Download files.
Long tracks can take minutes: run them as a background job.