Skip to content

Music

Generated

This page is auto-generated from psxsplash-main/src/luaapi.hh by scripts/py/gen_lua_api_docs.py. Edits won't survive the next build — fix the source comments instead.

7 entries, 1 with worked examples mined from godot-ps1/demo/scripts/ and the bundled templates.

Methods

Music.Stop()

Stops the active music sequence. Voices fade out over their remaining release time; instruments don't cut hard.

Music.IsPlaying() -> boolean

True if a music sequence is currently active (not stopped, not ended).

Music.SetVolume(v)

Master sequencer volume (0..127). Independent from per-instrument volumes set in the music bank. Use for fades, ducking, mixer.

Example

Music.SetVolume(DUCK_VOL)

Source: godot-ps1/demo/scripts/checkered_dialog.lua line 28.

Music.GetBeat() -> integer

Returns the integer beat count since the active sequence started, or 0 when nothing is playing. Use for rhythmic gameplay (sync a light flicker, an enemy hop, etc. to the beat).

Music.Find(name) -> index or nil

Look up a sequence by name in the scene's music bank. Returns its index (faster than passing the name to Music.Play repeatedly), or nil if not found.

Music.GetLastMarkerHash() -> integer (16-bit hash, 0 if none)

No description.

Music.MarkerHash(text) -> integer (16-bit hash)

No description.