Sequence Modifiers
Colon-chained modifiers reshape pattern and sequence references at expansion time over a flat token array (notes, rests, sustains, inline-effect tokens).
seq a = lead:rot(1):pal:transpose(+2)
seq b = motif:every(2,oct(+1)):lag(1)
seq c = riff:shuffle(42)
Modifiers apply left-to-right. Transpose family (oct, +N, semitone, …) accumulates and applies once at the end of the chain. Unknown modifiers warn and are ignored.
For a narrative walkthrough with the Tutorial Groove, see Tutorial — Modifiers.
Modifier catalog
| Modifier | Aliases | Behaviour |
|---|---|---|
oct(N) | — | Octave transpose (N × 12 semitones) |
+N / -N | semitone(N), st(N), trans(N), transpose(N) | Semitone transpose |
rot(N) | rotate(N) | Cyclic left rotation by N tokens |
rev | — | Reverse token order |
pal | palindrome | Palindrome: tokens + reverse without duplicating pivot |
slow(N) | slow (default 2) | Repeat each token N times |
fast(N) | fast (default 2) | Keep every Nth token |
arp(a,b,…) | — | Merge inline arp: on each note (omit leading 0) |
clamp(MIN,MAX) | — | Clamp pitch to range |
fold(MIN,MAX) | — | Fold pitch into range by octaves |
mute | rest | Replace notes with ., keep rhythm |
inst(name) | — | Sequence-level instrument override |
pan(value) | — | Pan override for the segment |
invert | inv | Invert pitch contour around the first note |
every(N,MOD) | — | Apply inner modifier on positions N, 2N, … (1-based) |
off(N) | lag(N) | Prepend N rest tokens |
pick(i,j,…) | — | Keep listed 1-based token positions |
chunk(N) | — | Split into chunks of N, reverse each chunk |
shuffle(seed) | — | Deterministic seeded shuffle |
presetName | any defined effect | Apply named effect preset to all notes |
Constraints
every(N,MOD)must stay token-local: the inner modifier must produce exactly one token and must not introduceinstorpanoverrides. Otherwise the token is left unchanged with a warning.- Nested parentheses in modifier arguments support one level (e.g.
every(2,oct(+1))). shufflerequires an explicit seed for deterministic export.
Details with demos
Rotate (rot)
Cyclic left shift by N tokens.
Interactive playback loads in the browser.
…seq a = motif # original phraseseq b = motif:rot(2) # rotate left by 2 tokens…Reverse and palindrome
Interactive playback loads in the browser.
…seq a = motif # original phraseseq b = motif:rev # reverse token orderseq c = motif:pal # palindrome (forward + reverse, no duplicated pivot)…Octave and transpose
Interactive playback loads in the browser.
…seq a = motif # original phraseseq b = motif:oct(+1) # up one octaveseq c = motif:transpose(+2) # up two semitones…Slow and fast
slow repeats tokens (lengthens); fast keeps every Nth token (shortens). Prefer length-preserving modifiers when locking multiple channels.
Interactive playback loads in the browser.
…seq a = short # original (4 tokens)seq b = short:slow(2) # repeat each token twice (lengthens)seq c = short:fast(2) # keep every 2nd token (shortens)…Every
Apply an inner modifier on every Nth token (1-based).
Interactive playback loads in the browser.
…seq a = motif # original phraseseq b = motif:every(2,oct(+1)) # every 2nd token up an octave…Lag / off
Prepend rest tokens.
Interactive playback loads in the browser.
…seq a = motif # original phraseseq b = motif:lag(2) # prepend 2 rests (delay the phrase)…Shuffle
Deterministic reorder with an explicit seed.
Interactive playback loads in the browser.
…seq a = motif # original phraseseq b = motif:shuffle(42) # deterministic shuffle (seed 42)…Named effect as modifier
Any defined effect preset can be applied as a modifier (e.g. :stacc for effect stacc = cut:2).
Interactive playback loads in the browser.
…effect stacc = cut:2 # named preset: gate each note after 2 tickspat motif = C5 E5 G5 C6 E5 G5 A5 G5seq a = motif # plain notesseq b = motif:stacc # apply the named effect as a modifier…