Skip to content

@liminal-hq/undertone / Score

Interface: Score ​

Defined in: score.ts:48

A compiled score: a one-cycle pattern, the tempo that makes one cycle equal one pass, and shortcuts to play it.

Properties ​

cps ​

readonly cps: number

Defined in: score.ts:52

The cps that plays pattern at the score's own tick rate.


pattern ​

readonly pattern: Pattern<ControlPatch>

Defined in: score.ts:50

One cycle is exactly lengthTicks ticks.


seconds ​

readonly seconds: number

Defined in: score.ts:54

Cue length in seconds.

Methods ​

loop() ​

loop(options?): LoopHandle

Defined in: score.ts:56

Loops the cue at its own tempo; the seam is exact because cycle times are rational.

Parameters ​

options? ​

Omit<LoopOptions, "bpm" | "cps">

Returns ​

LoopHandle


play() ​

play(options?): PlaybackHandle

Defined in: score.ts:58

Plays one pass of the cue.

Parameters ​

options? ​

Omit<PlayOptions, "bpm" | "cps">

Returns ​

PlaybackHandle


render() ​

render(options?): Promise<RenderedAudioBufferLike>

Defined in: score.ts:60

Renders one pass of the cue offline at its own tempo. Add a tail to let releases ring out, or wrap it for a seamless loop.

Parameters ​

options? ​

Omit<RenderOptions, "bpm" | "cps" | "seconds">

Returns ​

Promise<RenderedAudioBufferLike>