sound
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
sound
<!-- 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/v2ffe.cinema.sound — the sound film of FIRE FOR EFFECT. There is no music. The score of this film is the wind, the machinery and the guns, and the one dramatic gesture in it is a SILENCE: at t = 89 the battery stops, the last echo comes back off the far wall at t = 91, and for the five seconds after that the only thing left in the mix is a thread of wind. Shot 15 is called "the silence arriving" and it is scored as one. HOW SOUND IS PLACED. Every source is an `Audio` component on an entity this slice owns, standing where the thing that makes the sound stands. `ffe.cinema` moves `FilmListener` to the camera's eye every tick, so the mix is heard from the shot: the macro on the breech at 4 cm is a close mix, the aerial at 120 m is not. THE ECHO IS A SECOND SOURCE, not a reverb. A gun report on a saddle above a three-kilometre valley comes back off the far wall about two seconds later, from the direction of the wall — so the echo is emitted by an entity out at the far peaks, `ECHO_DELAY` seconds after the report. That is why the battery sounds like it is standing somewhere. EVERYTHING IS ON FILM TIME. Cues fire by CROSSING: each tick plays the events that lie in (previous t, t]. A seek backwards re-arms them, so authoring one shot and then running the film from the top plays the same sound film both times.
buildSchedule( ) → void
Every round the battery fires, as { t, gun }. Deterministic and built once.
try(what: string, fn: any, ...: ?) → boolean
| arg | type | description |
|---|---|---|
| what | string | |
| fn | any | |
| ... | ? |
clip(role: string) → any
| arg | type | description |
|---|---|---|
| role | string |
emitterPosition(key: string) → void
| arg | type | description |
|---|---|---|
| key | string |
emitter(key: string) → any
| arg | type | description |
|---|---|---|
| key | string |
playOn(key: string, role: string, volume: number, pitch: number?) → void
| arg | type | description |
|---|---|---|
| key | string | |
| role | string | |
| volume | number | |
| pitch | number? |
build(root: any) → void
Build
| arg | type | description |
|---|---|---|
| root | any |
windLevel(t: number) → number
How loud the wind is at film time t. Loudest at the east lip where the deck pours over it (shots 1, 2, 16), lowest down among the revetments and at the macro stations, and it is the only thing left in shot 15.
| arg | type | description |
|---|---|---|
| t | number |
batteryLevel(t: number) → number
The mix level of the whole battery: full while it is firing, gone after.
| arg | type | description |
|---|---|---|
| t | number |
fireBetween(a: number, b: number) → void
| arg | type | description |
|---|---|---|
| a | number | |
| b | number |
tick(t: number, _dt: number, eye: { number }?, _at: { number }?) → void
| arg | type | description |
|---|---|---|
| t | number | |
| _dt | number | |
| eye | { number }? | |
| _at | { number }? |
reset( ) → void
report(t: number) → void
Reading it back The rounds and cues that fall inside a window, and what is bound.
| arg | type | description |
|---|---|---|
| t | number |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
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.