# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# Still
One-paragraph description of what this module provides and who consumes
it.
## Exports
- `M.exampleFn(arg) -> result` — what it does and when to call it.
- `M.exampleValue: type` — what value it carries.
## Usage
Replace `<identity>` with the string `asset.create` returned — this
module's source path with `/` written as `.` and each segment's type
suffix dropped, the way a module at `/source/lib/thing.module` is
`lib.thing` and one at `/source/kit.package/thing.module` is
`kit.thing`.
```luau
local M = require("<identity>")
M.exampleFn("foo")
```
## Notes
- Anything callers need to know about THIS module: required runtime
ordering, state ownership, side effects.
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# audio.Clips
The shared sound library of **The Eighth Ketyl**. Any slice can make a noise
through it, and any slice can replace the noise it makes.
```luau
local Clips = require("audio.Clips")
Clips.play("sfx_drip", { position = p, volume = 0.5 }) -- make a noise
Clips.register("sfx_drip", myOwnClip) -- and replace it
```
`play` needs no entity from the caller: the library keeps a pool of voices under
the sound slice's host and cycles them. An id with no clip warns once and stays
silent — never an error, so a slice can call it before the library has loaded.
## The ids
`sfx_discharge` · `sfx_surge` · `sfx_plate` · `sfx_clear` · `sfx_riser` ·
`sfx_ascend` · `sfx_growth_hurt` · `sfx_growth_burn` · `sfx_drip` ·
`sfx_splash` · `sfx_soak` · `sfx_sodium` · `sfx_seal` · `sfx_quench` ·
`warn_low` · `warn_wet` · `ui_move` · `ui_confirm` · `ui_back` · `ui_open`
The sound slice registers a clip for every one of them at start, and the Score
component already plays most of them off the event bus. Authoring your own is
for when your slice wants a *better* noise for its own thing, not for making it
audible at all.
## Registering
- `register(id, ref)` — take an id over, replacing whatever held it.
- `registerDefault(id, ref)` — take it only if nothing holds it yet. The sound
slice seeds its whole library this way, so a slice that got there first keeps
its own clip.
- `get(id)` / `has(id)` / `ids()` — what is registered.
- `setPoolParent(ref)` — where the pooled voices live.
## The spoken script, read through the library
Staging cues a line by id and never writes the words; it asks here for them.
- `text(id)` — the written form of a spoken line.
- `speaker(id)` — `"chemist"` or `"column"`.
- `duration(id)` — how long the line runs, **measured off the clip that says
it**, falling back to a reading estimate when a line has no audio. That is
what lets a caption leave the screen with the voice rather than on a guess.
- `lines()` — the whole script as id → text.
The words themselves live in `audio.Script`, which is the one place they are
written.
## Play options
```luau
Clips.play(id, {
position = { x = 0, y = 0, z = 0 }, -- play it there; makes it spatial
volume = 1, pitch = 1,
channel = "sfx", -- or "ui"
spatial = true, maxDistance = 34,
})
```
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# audio.Script
Every word **The Eighth Ketyl** says, written down. Sixteen lines, two speakers,
and the ids the design spec fixes so staging can cue a line today and the sound
slice can voice it separately.
```luau
local Script = require("audio.Script")
Script.text("v_seal_2") -- "Deep blue. Dry. Eight tries. Hello, ketyl eight."
Script.speaker("v_plate_5") -- "column"
```
## The two speakers
**THE CHEMIST** is the woman running the still. She has lost seven ketyls and
talks to this one the way you talk to something you expect to lose: dry,
clinical, tired, and — by the head plate — invested despite herself. She is
heard over a radio from outside the glass.
**THE COLUMN** is the still's own instrument readout. Flat, mechanical, states
numbers. It is a machine and it sounds like one: its read is pitched down onto a
machine's clock, ring-modulated onto a carrier, quantised to a readout's step
ladder and cut to an intercom's band.
## The lines
| id | speaker | when |
|---|---|---|
| `v_open_1` `v_open_2` `v_open_3` | chemist | the opening, before control |
| `v_plate_2` … `v_plate_8` | column | arriving on that plate |
| `v_clear` | chemist | a plate goes clean |
| `v_low` | column | charge critical |
| `v_wet` | chemist | wetness critical |
| `v_quench` | chemist | the loss |
| `v_seal_1` `v_seal_2` | chemist | the win |
## Why the words live here and not in the audio
Every spoken line ships with its written form on screen. It is how a line
survives a failed generation, a muted player and a noisy room. If a clip is
missing the game still says the line — it is captioned rather than lost.
## API
- `get(id)` → `{ id, speaker, text }` or nil.
- `text(id)` → the words, or `""`.
- `speaker(id)` → `"chemist"` / `"column"` / `""`.
- `all()` → every line in reading order.
- `ids()` → every id in reading order.
- `duration(id)` → how long the line takes to read aloud, as an estimate.
`audio.Clips.duration(id)` is better — it measures the clip.
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).
# SoundClip
Managed audio asset. `data.zaud` is the engine-native ZAUD payload the runtime decodes and plays; compression settings live in the `.metadata` `settings` block (edit to re-encode).