@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
readonlycps:number
Defined in: score.ts:52
The cps that plays pattern at the score's own tick rate.
pattern
readonlypattern:Pattern<ControlPatch>
Defined in: score.ts:50
One cycle is exactly lengthTicks ticks.
seconds
readonlyseconds: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
play()
play(
options?):PlaybackHandle
Defined in: score.ts:58
Plays one pass of the cue.
Parameters
options?
Omit<PlayOptions, "bpm" | "cps">
Returns
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>