Audio · interface
MixConsoleOptions
The mixer: a tree of buses, and the one place that can answer a question about all of them.
Explained in Your first game.
interface MixConsoleOptionsimport type { MixConsoleOptions } from '@driftengine/audio';In depth
A bus knows its own level and its own parent. Solo is the question no bus can answer alone — "is anything else soloed, and am I part of it" is a property of the whole tree — so the tree is held here and every bus asks this when its own solo changes.
Everything scheduled through one clock. at() and scheduleAt() are the same pair
AudioGraph has always had, and for the same reason: offline there is no "now", so a render
describes its whole timeline against instants a caller supplies. Every bus is handed this clock
at construction, so there is exactly one answer to "when" in a mix rather than one per node.
Properties
| Name | Type | Description |
|---|---|---|
scheduleAtreadonlyoptional | ScheduleClock | Where "now" is. Defaults to the context's own clock, which is what a live mix wants. |
randomreadonlyoptional | () => number | Where randomness comes from, for anything this console builds that needs it — today, the noise
an impulse response is made of.MoreDefaults to Cost: a caller that seeds this gets a reproducible reverb and also a worse-sounding one if they seed it badly, because the tail's quality is the quality of its noise. What would make this wrong is a consumer using it to make the reverb deterministic in production, which is solving a problem nobody has at the price of one they will. |