demo.lens.sound — the soundtrack, on the film's clock
Three layers, cued three different ways.
Beds. Rain outside, rain heard through a wall, wind, the gas, the room
itself. Looping sources whose level is a pure function of film time and of
INSIDE, the one number that says how far into the building each shot is:
0 is the vale in the rain, 1 is the middle of the mortuary with the door
shut. It decides what the rain sounds like, whether the gas is audible, and
whether there is a room at all. After the strike the door stands open and the
vale comes back in through it.
Score. Nine sustained tones loop forever and this module holds each one's LEVEL as a ramp over film time. That is why the harmony can arrive, tighten and be cut off dead at 58.40: a level is on the film's clock, and a stem playing through is on the wall clock, and a rendered frame is not a wall-clock frame. Movement I is a low D pedal under the vale; movement II brings the minor third in at the first interior and tightens to a cluster; movement III is hollow — an open fifth high up, and the pedal returning to go out with the storm.
Cues. 76 one-shots at exact film times. Thunder is the whole point: a
stroke at 3.09 km is heard 9.01 s later because its cue sits at
film.thunderAt(i) and nowhere else. Stroke 1 fires at t = 2.00 and is heard
at t = 11.01; stroke 12 takes the spire and is heard at t = 58.40,
the same instant. Stroke 15's thunder would arrive at 97.90 s, after the film
has ended, and that silence is the storm having gone.
local sound = require("demo.lens.sound")
sound.cues() -- every one-shot, in film-time order
sound.status() -- the cursor, the next cue, any missing clip
sound.missingClips() -- what the world does not have
Cues fire when the clock crosses them. A seek re-arms rather than firing
everything it skipped, so run() from the top sounds the same every time and
seek(t) paints a frame in silence.
Spatial hosts ride the entities they are the sound of — Bell7,
MortuaryDoor, Lantern — and the footstep host walks the aisle and then
the avenue, so a bell heard from the west end of the mortuary is on the same
side of the frame it is drawn on.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2demo.lens.sound — the soundtrack of "Sexton's Bell", on the film's clock. Three layers, and they are cued three different ways: BEDS rain outside, rain heard through a wall, wind, the gas, the room itself. Looping sources whose LEVEL is a pure function of film time and of how far inside the building the shot is. SCORE nine sustained tones that loop forever; the harmony is their nine level envelopes, so the cluster tightens and is cut off dead at the strike on the film's clock. CUES one-shots at exact film times. Thunder is the whole point: a stroke at 3.09 km is HEARD 9.01 s later, because the cue sits at film.thunderAt(i) and nowhere else. Cues fire when the clock crosses them, and a seek re-arms rather than firing everything it skipped, so `run()` from the top sounds the same every time and `seek(t)` paints a frame in silence.
missingClips( ) → void
Which clips the film wants and the world does not have.
insideAt(t: number) → number
| arg | type | description |
|---|---|---|
| t | number |
thunderClip(km: number) → void
The cues The clip is the distance: a stroke three kilometres off is a roll with no front to it, one overhead is a crack. The level rides the same curve, so each stroke in the run is louder than the one before it.
| arg | type | description |
|---|---|---|
| km | number |
cue(t: number, host: string, clip: string, vol: number, pitch: number?) → void
| arg | type | description |
|---|---|---|
| t | number | |
| host | string | |
| clip | string | |
| vol | number | |
| pitch | number? |
cues( ) → void
Every one-shot the film fires, in film-time order.
score( ) → void
The nine score voices with their clip, gain and level ramp.
bedLevels(t: number) → void
The five bed levels at film time t, keyed the way the mixer sets them.
| arg | type | description |
|---|---|---|
| t | number | Absolute film time in seconds. |
channelMix( ) → void
The mixer's per-channel volumes, so the same mix can be rendered off the film's clock.
emitter(name: string, clip: ?, opts: ?) → void
| arg | type | description |
|---|---|---|
| name | string | |
| clip | ? | |
| opts | ? |
followPoint(key: string) → void
| arg | type | description |
|---|---|---|
| key | string |
stepPoint(t: number) → void
Where a footstep is: the sexton's line down the aisle of the mortuary, and then the footprints going away up the avenue.
| arg | type | description |
|---|---|---|
| t | number |
build( ) → void
Spawn the emitters, start the beds and the tones, and set the mix. Idempotent.
bed(name: ?, clip: ?, ch: ?) → void
| arg | type | description |
|---|---|---|
| name | ? | |
| clip | ? | |
| ch | ? |
armAt(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
fire(c: ?) → void
| arg | type | description |
|---|---|---|
| c | ? |
update(t: number) → void
Put the whole soundtrack at film time t. Beds and score are pure; one-shots fire on the crossing and a seek re-arms instead.
| arg | type | description |
|---|---|---|
| t | number | Absolute film time in seconds. |
status( ) → any
What the soundtrack is doing at the moment: the levels it is holding and the next cue it will fire.
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.