Skip to content

@liminal-hq/undertone / mini

Function: mini()

mini<T>(source, leaf): Pattern<T>

Defined in: mini.ts:253

Parses a mini-notation string into a Pattern, transforming each leaf word with leaf (which should throw on invalid words — errors are reported with their position in the source string).

Supported notation: whitespace sequences, ~ rests, [a b] subdivision, <a b> per-cycle alternation, a*2 / a/2 speed, a!3 replication, a@3 elongation, [a,b] parallel stacking, and a(3,8,rot) euclidean rhythms.

Type Parameters

T

T

Parameters

source

string

leaf

(word) => T

Returns

Pattern<T>