@liminal-hq/undertone / PlayOptions
Interface: PlayOptions
Defined in: scheduler.ts:28
Where a voice's output lands, and options shared by every way of playing voices.
Extends
Properties
bpm?
optionalbpm?:number
Defined in: scheduler.ts:32
Tempo in beats per minute, four beats to a cycle. Default 120 (2-second cycles).
cps?
optionalcps?:number
Defined in: scheduler.ts:34
Tempo in cycles per second — an alternative to bpm for scores that know their loop length in seconds. Passing both throws.
ctx?
optionalctx?:AudioContextLike
Defined in: scheduler.ts:30
Audio context to schedule against; a lazily-created shared AudioContext when omitted.
gated?
optionalgated?:boolean
Defined in: scheduler.ts:43
Hold each event's envelope at its sustain level for its own share of the cycle, exactly like loop() — for previewing what one looped cycle will sound like. Default false: envelopes stay percussive (0.1.x SFX behaviour), which is what one-shot game sound effects want.
output?
optionaloutput?:AudioNodeLike
Defined in: engine.ts:115
Node the voices (and their effects buses) connect to instead of ctx.destination, e.g. a game's own mix bus.
Inherited from
when?
optionalwhen?:number
Defined in: scheduler.ts:36
Absolute start time on the context's clock. Default: now.