Skip to content

five-on-it / apps/client/src/audio/bank / SoundDef

Interface: SoundDef ​

Defined in: apps/client/src/audio/bank.ts:30

How a sound is mixed: its entry of the bank, with the defaults filled in.

Properties ​

bus ​

bus: "vehicle" | "world" | "music" | "sfx" | "ui"

Defined in: apps/client/src/audio/bank.ts:32

The bus it plays on.


loop ​

loop: boolean

Defined in: apps/client/src/audio/bank.ts:38

Whether it loops (an engine, the rain) rather than plays once.


pitch ​

pitch: readonly [number, number] | undefined

Defined in: apps/client/src/audio/bank.ts:36

The range its rate is picked from at random each time it plays, for variety; none by default.


placeholder ​

placeholder: string

Defined in: apps/client/src/audio/bank.ts:44

What plays while it has no file: synth:<name> (placeholders.ts).


range ​

range: number | undefined

Defined in: apps/client/src/audio/bank.ts:42

How far it carries (m): it fades to nothing there, and pans with where it is.


voices ​

voices: number

Defined in: apps/client/src/audio/bank.ts:40

How many of it may play at once (the oldest stops); 8 by default, 1 for a loop.


volume ​

volume: number

Defined in: apps/client/src/audio/bank.ts:34

Its volume, a factor (1 by default).