Skip to content

@liminal-hq/undertone / RenderOptions

Interface: RenderOptions ​

Defined in: render.ts:34

Properties ​

bpm? ​

optional bpm?: number

Defined in: render.ts:40

Tempo, as in loop(): beats per minute (four beats a cycle). Pass this or cps.


channels? ​

optional channels?: 2 | 4 | 1 | 6 | 8

Defined in: render.ts:46

Output channels: 1, 2, 4, 6 or 8. More than two uses discrete multichannel output. Default 2.


context? ​

optional context?: (init) => OfflineAudioContextLike

Defined in: render.ts:58

Builds the offline context. Defaults to the global OfflineAudioContext; supply this outside a browser.

Parameters ​

init ​

OfflineContextInit

Returns ​

OfflineAudioContextLike


cps? ​

optional cps?: number

Defined in: render.ts:42

Tempo, as in loop(): cycles per second. Falls back to setcpm(), then the default tempo.


cycles? ​

optional cycles?: number

Defined in: render.ts:36

Whole pattern cycles to render. Default 1 when seconds is omitted. Pass this or seconds, not both.


gated? ​

optional gated?: boolean

Defined in: render.ts:54

Hold each note for its share of the cycle, like loop(). Use false for a one-shot like play(). Default true.


master? ​

optional master?: boolean | Omit<MasterBusOptions, "output">

Defined in: render.ts:56

Route through the master bus and its limiter (default), tune it with an object, or false for the raw mix.


sampleRate? ​

optional sampleRate?: number

Defined in: render.ts:44

Sample rate of the render. Default 48000.


seconds? ​

optional seconds?: number

Defined in: render.ts:38

Seconds of the pattern to render: onsets at or after this time are dropped.


seed? ​

optional seed?: string | number

Defined in: render.ts:52

Seeds noise and reverb so the same inputs give the same samples on the same engine. Default 0.


tail? ​

optional tail?: number

Defined in: render.ts:48

Extra seconds rendered after the pattern, so releases and reverb can ring out. Default 0.


wrap? ​

optional wrap?: boolean

Defined in: render.ts:50

Fold the tail onto the start, so the result loops seamlessly. The result is then exactly one pass long. Default false.