mix
The fen's sound, running. One component, on the `Sound` anchor.
sound.mix
The fen's sound, running. One component, on the Sound anchor.
It builds every emitter the game speaks through as children of that anchor,
holds the score and the ambience, answers every signal the other slices raise,
and keeps the whole thing in proportion. Nothing else in the game creates an
Audio component for the bed, the voice or the shared one-shots — which is
what makes a mix possible instead of eight sources at full volume.
What it builds
| Child | Holds |
|---|---|
BedFen | the score at rest, looping |
BedPress | the same drone with the tide in it, looping |
BedLament | one reed pipe over the drone — the title and both endings |
BedCrest | the crest cue, played once through |
AmbAir | wind through the reed beds, with the far birds under it |
AmbWater | brackish water against the posts |
VoiceHost | every spoken line |
UiHost | the interface answering |
WorldHost | flat one-shots |
Emitter1..4 | spatial one-shots, moved to wherever the sound happens |
The mix
voice 1.00 a spoken line is the loudest thing in the fen, always
sfx 0.52 what the world does — gates, water, a yowe going in
ui 0.50 the interface answering, under everything
music 0.42 the bed. It is a bed. It sits UNDER.
ambient 0.45 wind and water, the ground the rest stands on
master 0.82 headroom for two one-shots landing on the same frame
Under a spoken line the bed and the ambience drop to voiceDuck (0.45) of
where they were, because a game where the score and the dialogue are the same
size is a game where you can hear neither.
Measured at the bus: the bed and ambience together sit around 0.09 peak, one one-shot reaches about 0.6, a spoken line lands between 0.6 and 0.8, and the worst burst the game can produce — a wrong answer, a yowe taken and a tide step inside a second — peaked at 0.69 and 0.59 over two runs. Nothing clips.
The score follows the tide
bed_fen and bed_press are two loops crossfaded by TIDE_T, so the music
tightens across the run without anybody cueing it:
TIDE_T | BedFen | BedPress | AmbWater |
|---|---|---|---|
| 0.00 | 1.00 | 0.00 | 0.30 |
| 0.35 | 0.70 | 0.11 | 0.44 |
| 0.70 | 0.00 | 0.68 | 0.72 |
| 1.00 | 0.00 | 0.90 | 0.91 |
Signals it answers
HAILED · ANSWERED · GATE_OPENED · YOWE_LOST · TIDE_STEP ·
UI_CLICK · PHASE
Every subscription is kept and dropped in onDestroy, so a hot edit does not
leave a second copy of this component's ears behind.
Fields and methods
master, musicLevel, ambientLevel, sfxLevel, uiLevel, voiceLevel,
voiceDuck — all live, all 0..1, so a settings screen can drive them and be
heard as the slider moves.
:playSfx(name, at?)— a one-shot from the shared library;atputs it out in the world instead of flat across the mix.:speak(lineId)— a written line, spoken. The text goes on screen either way.:report()— what the mix is actually doing: every layer's live gain, its mixer state, whether it is audible, and why it is not when it is not.
Scoped to this part · feeds back into the world's score.