FolioTier 1
music
Control the music channel — play, queue, or stop a background track.
Parameters
| Parameter | Kind | Required | Default | Notes |
|---|---|---|---|---|
| action | identifier | yes | — | One of `play`, `queue`, or `stop`. `play` starts a new track immediately; `queue` schedules a track to play once the current one finishes; `stop` stops the music channel without starting anything new. |
| reference | identifier | no | — | Audio reference registered in the project's audio table. Required for `play` and `queue`; omit for `stop` (a `music stop` with a reference is a parse error). Quoted form is accepted when the reference contains characters outside the identifier pattern. |
| once | identifier | no | — | Optional `play`/`queue` modifier — `music play stinger once` plays the track a single time without looping (Ren'Py's `noloop`). Omit for the default looping behavior on the music channel. |
| fade | number | no | — | Optional `stop` modifier — `music stop fade=1` fades the music gain down over 1 second before releasing the channel (Ren'Py's `fadeout 1`). Bare `music stop` hard-cuts. |
| on | identifier | no | music | Optional channel override. `music` lines default to the `music` channel — pass `on <channel>` to route to a different one (rare; usually for layered background ambiences on a second channel). |
Canonical example
music play kitchen-theme
music play stinger once
music stop fade=1play music "kitchen-theme.ogg"
play music "stinger.ogg" noloop
stop music fadeout 1music is the background-track verb. It takes an action keyword
(play, queue, stop) followed by the audio reference for play
and queue, or nothing for stop. Folio folds Ren'Py's
play music/queue music/stop music triplet into a single verb
with three actions so the node editor can render music control as one
block type rather than three.
Notes
The channel defaults to music. Most projects never override it —
the on <channel> clause exists for the unusual cases (a layered
ambient bed on a second channel while music is also playing). The
importer's deterministic pass maps Ren'Py's play audio "..." channel "<name>" shape onto this clause.
queue is a real distinction from play: it schedules a track to
play once the currently-playing track ends naturally, so two
back-to-back music queue lines build a playlist. A music play
replaces the queued track immediately, with no fade.
Modifiers
Two optional modifiers lift the most common Ren'Py audio idioms into Folio:
once— appended toplayorqueue. Plays the track a single time without looping. Mirrors Ren'Pyplay music "stinger.ogg" noloop. Useful for one-shot stinger SFX layered on the music channel that should stop on their own rather than loop until the nextmusic stop.fade=N— appended tostop(whereNis seconds, integer or decimal). Fades the music gain down overNseconds before releasing the channel. Mirrors Ren'Pystop music fadeout 1. Baremusic stophard-cuts.
The modifiers compose with on <channel> and conditional if
tails. Order: <action> <ref> [once] [on <channel>] [if <cond>] and
stop [fade=Ns] [on <channel>] [if <cond>].