◇
component · drop-in viewer
Mixer
Everything GREASEPAINT sounds like. Mounted once on the scene's `Sound` anchor: it stands the mix up (`game.audio.bus`) and holds the levels the whole night is balanced at. No sibling components are required — it spawns its own sources under the anchor and tears them down again.
by·posted 1mo ago
What it does
Mixer
Everything GREASEPAINT sounds like. Mounted once on the scene's Sound
anchor: it stands the mix up (game.audio.bus) and holds the levels the whole
night is balanced at. No sibling components are required — it spawns its own
sources under the anchor and tears them down again.
Public fields
masterVolume: number— 0..1, the level the whole mix is heard at.musicVolume: number— 0..1, the calliope bed, before ducking.ambienceVolume: number— 0..1, the tent: canvas, wind, the rope — and the house drone that rises with the heat.sfxVolume: number— 0..1, the gags, the blows and the table.voiceVolume: number— 0..1, the spoken lines.
Probes
Three methods read the mix without listening to it. Every check the sound slice makes is made of them.
:observe()— what the mix is doing right now: which sources are sounding andwhySilent()for any that are not, the master meter (peak,rms), whether a line is being spoken, how many listeners the bus holds, how warm the house is (heat), where the drone sits (drone.gain/.target/.running), andrecent— the last twelve one-shots the bus actually started, each with its clip name and the bus clock it started at.recentis how you tell "the event was heard" from "something else was loud".:cue(name, opts)— play one clip fromgame.audio.libraryby name.opts.whereis"ring"(out in the spotlight) or"ui"(at the seat). Answersfalsewhen the clip is missing, re-triggered inside 60 ms, or over the one-shot budget.:say(id)— speak one line fromgame.audio.Linesand print it as a subtitle. Answers whether a reading was there; the words are emitted either way.
Lifecycle
start()— installs the bus on this entity and pushes the levels.update(dt)/editorUpdate(dt)— advances the mix: the duck under a spoken line releasing, and the house drone moving toward the heat.onPropertyChanged()— pushes the levels again.onDestroy()— uninstalls the bus, dropping every listener and source.
Usage
local mixer = entity.find("Sound").component.get("Mixer")
mixer:observe() -- what is sounding, and how warm the house is
mixer:cue("tent_laugh_3") -- the whole house, once
mixer:say("marrow_heat2") -- spoken, subtitled, ducked
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.