Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

bgm

Plays or stops looping music from audio/bgm/.

{ "type": "bgm", "value": "main_theme", "volume": 0.7, "fadein": 1.0 }
{ "type": "bgm", "value": null, "fadeout": 1.0 }
[bgm main_theme fadein 1.0 volume 0.7]
[bgm stop]

Usually you need

FieldTypeDefaultEffect
valuestring or null—Track name; null / stop clears
volume0–11.0Track ceiling
fadein≥ 01.0 when playingNew track fade-in
fadeout≥ 00 play; 1.0 if stopping and omitted/0Old track fade-out

All fields

FieldTypeDefaultEffect
valuestring or null—Track / stop
volume0–11.0Ceiling
fadein≥ 01.0 (play)Fade in
fadein_from0–10.0Start fraction of ceiling
fadeout≥ 0see aboveFade out
fadeout_to0–10.0End fraction
whenexpression—Skip when falsy

Same track again does not restart; volume may update. Both fadein + fadeout on play → crossfade. Title default BGM uses sounds.main_bgm* (often 1.5s fades) — not these command defaults. Audio · sounds.