mixer
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
mixer
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game.audio.mixer — the mix, as data. What each emitter is for, how loud each thing sits, which clip answers which moment, and the caption plate that carries a spoken line in writing. The Conductor component reads all of it; nothing here touches the engine, so it can be read and checked from anywhere.
levels(cue: string, share: number) → any
--!desc The three layer levels for a cue at a given blight share. --!arg cue A key of M.CUES. --!arg share The blight's share of the board, 0..1. --!return A table { calm, swell, sour } of target volumes. --!example local v = Mixer.levels("mission", 0.4)
| arg | type | description |
|---|---|---|
| cue | string | |
| share | number |
resolveSfx(name: string) → string
--!desc Resolve a caller's sfx name to a clip this slice owns. --!arg name Whatever the caller asked for. --!return The real clip name, or nil when nothing answers to it. --!example local n = Mixer.resolveSfx("weapon_anselm") -- "attack_anselm"
| arg | type | description |
|---|---|---|
| name | string |
resolveCue(cue: string) → string
--!desc Resolve a caller's music cue to one this slice has levels for. --!arg cue Whatever the caller asked for. --!return The real cue name, or nil. --!example local c = Mixer.resolveCue("ending:won") -- "victory"
| arg | type | description |
|---|---|---|
| cue | string |
knows(name: string) → boolean
--!desc Whether a name is one of the published sfx names. --!arg name The clip name. --!return true when the audio slice answers to it. --!example if Mixer.knows("ui_click") then ... end
| arg | type | description |
|---|---|---|
| name | string |
rgba(c: { number }, a: number) → string
| arg | type | description |
|---|---|---|
| c | { number } | |
| a | number |
captionTree(speaker: string, text: string, tint: { number }, spoken: boolean) → any
--!desc The caption screen's widget tree. --!arg speaker Who is speaking — shown above the line, in small caps. --!arg text The words, verbatim. --!arg tint The speaker's identifying colour, {r,g,b} 0..1. --!arg spoken Whether the line has audio; a line with none is marked, not hidden. --!return A widget tree for ui.registerScreen. --!example ui.registerScreen("audio_caption", Mixer.captionTree("Anselm", "Prune it back.", {0.4,0.5,0.3}, true))
| arg | type | description |
|---|---|---|
| speaker | string | |
| text | string | |
| tint | { number } | |
| spoken | boolean |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.