Log inGet started
World

The Hernsew Lingster

Branchmain
Branchesmain
Commitc51c06f1f8

README.md

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

ChildHolds
BedFenthe score at rest, looping
BedPressthe same drone with the tide in it, looping
BedLamentone reed pipe over the drone — the title and both endings
BedCrestthe crest cue, played once through
AmbAirwind through the reed beds, with the far birds under it
AmbWaterbrackish water against the posts
VoiceHostevery spoken line
UiHostthe interface answering
WorldHostflat one-shots
Emitter1..4spatial 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_TBedFenBedPressAmbWater
0.001.000.000.30
0.350.700.110.44
0.700.000.680.72
1.000.000.900.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; at puts 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.