Skip to content

volume

The song's own audio: the instrumental and the two vocal tracks. Duck the music for a quiet moment, cut the opponent's voice for a dramatic pause.

How to use it

volume is always there. 0-1, on top of the player's own volume. Sounds a script plays have their own volume (playSound, soundVolume). More: Sounds and music.

Psych: setProperty('vocals.volume', ...), FlxG.sound.music.volume · Kade: —

Example code

-- The music drops away for a bar, only the vocals stay.
function onEvent(p)
    tween(volume.inst, 0, beats(0.5))
    after(beats(4), function() tween(volume.inst, 1, beats(0.5)) end)
end

Properties

Property Kind Default
volume.inst number 1 The instrumental.
volume.player number 1 Your vocals - the track a miss mutes.
volume.opponent number 1 The opponent's vocals. A single vocal track with both singers in it follows the louder of …

volume.inst

number volume.inst = 1

0 – 1share of the screen

The instrumental.

volume.player

number volume.player = 1

0 – 1share of the screen

Your vocals - the track a miss mutes.

volume.opponent

number volume.opponent = 1

0 – 1share of the screen

The opponent's vocals. A single vocal track with both singers in it follows the louder of the two.