FolioTier 1

music

Control the music channel — play, queue, or stop a background track.

Parameters

ParameterKindRequiredDefaultNotes
actionidentifieryesOne 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.
referenceidentifiernoAudio 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.
onceidentifiernoOptional `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.
fadenumbernoOptional `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.
onidentifiernomusicOptional 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

Folio
music play kitchen-theme
music play stinger once
music stop fade=1
Ren'Py
play music "kitchen-theme.ogg"
play music "stinger.ogg" noloop
stop music fadeout 1

music 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 to play or queue. Plays the track a single time without looping. Mirrors Ren'Py play 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 next music stop.
  • fade=N — appended to stop (where N is seconds, integer or decimal). Fades the music gain down over N seconds before releasing the channel. Mirrors Ren'Py stop music fadeout 1. Bare music stop hard-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>].

See also

  • sound — same action grammar for SFX
  • voice — character voice clips (placeholder; future construct)