synth
Every clip in **Sexton's Bell** is made here out of noise and sine, baked once into `.soundClip` assets under `/zero/source/demo/sound/`, and then only played. Nothing in this module runs per frame.
demo.lens.synth — where the sound comes from
Every clip in Sexton's Bell is made here out of noise and sine, baked
once into .soundClip assets under /zero/source/demo/sound/, and then only
played. Nothing in this module runs per frame.
local synth = require("demo.lens.synth")
synth.names() -- the 29 clips the film plays
synth.missing() -- which of them the world does not have
synth.bake("bell7")
synth.bakeAll() -- bake what is missing; pass true to re-bake all
Baking all 29 takes a few seconds and writes to /source, so it is an
authoring call — run it from an execute, not from a component, where an
asset.create would be filed in the ephemeral runtime store instead and
re-baked on every boot.
The recipes
thunder_far / mid / near / strike | one recipe at four distances. The crack is a broadband burst, the roll is noise through a moving lowpass under an envelope built from several overlapping claps — which is what makes distant thunder rumble rather than fade — and a swept sine carries the low end. |
rain_out / rain_in / wind_bed / gas_hiss / room_tone | the beds, each crossfaded tail-into-head so it loops with no seam. The wind's whole character is a cutoff that wanders. |
bell7 / bell_rail | additive. A bell's partials are not harmonic, and each is split by a fraction of a hertz so the tone beats instead of sitting still. |
door_creak / door_shut / lantern_hook / lantern_drop / lantern_roll | stick-slip friction through a walking resonant band, and struck bodies as a lowpassed thud plus inharmonic ring. |
boot_splash / wet_step / gravel_step / slates | water as hiss over body over a rising gulp; slates as a scatter of hard ceramic clicks. |
tone_d2 … tone_a4 | the nine sustained voices of the score. Each is a whole number of cycles long, so it wraps with no seam and needs no crossfade — cycles / 6 s gives a frequency a few cents off equal temperament and dead steady. The vibrato wraps too. |
Determinism: every generator draws from mkrand(seed), a seeded LCG, so
baking the same recipe twice produces the same bytes.
Scoped to this part · feeds back into the world's score.