Skip to content
Docs menu

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

OptionTypeLimitsWhat it does
promptstring1 to 8000 characters, requiredThe music you want: mood, genre, instruments, tempo.
modelstringcomposer-omni-2.5 (default), composer-omni-2.0, wave-composer-omni-v1, wave-composer-pulse-v1The Composer model. composer-omni-2.0 is served by 2.5.
effortstringlow (default) or medium (mid also accepted)medium adds the symbolic note model and takes longer.
durationnumberabove 0, at most 300 secondsTarget length.
session_idstringsee SessionsWhich 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.