Skip to content

Mini-Notation Grammar

This is the terse lookup table for everything that goes inside pattern brackets. For the narrative walkthrough with timing breakdowns, see Mini-Notation in Depth; for euclidean and polymetric rhythms in depth, see Polymetric & Euclidean.

Every example below is a fragment — drop it inside a pattern and feed it to a track:

use "std/instruments" { Sampler, Kit };
let drums = AudioTrack("drums");
drums.load_instrument(Sampler(Kit("TR-808")));
drums << [bd <sd [sd sd]>, ch*8, <_ oh>];
PLAY;

How elements are grouped and how time is divided.

TokenNameMeaning
[ … ]SequenceElements share the slot, each gets slot / count. Nest to subdivide.
,Parallel groupsSplit a bracket into simultaneous voices, each on its own time grid.
< … >AlternationOne element per cycle, chosen by cycle % count; fills the whole slot.
{ … }PolymetricSteps per cycle = length of the first group (or 1 for a single group).
{ … }%nPolymetric ÷ nForce n steps per cycle regardless of group length.
_RestA silent slot.
let sequence = [C4 D4 E4]; // three slots, 1/3 cycle each
let nested = [[C4 D4] E4]; // C4,D4 in the first half; E4 in the second
let parallel = [C4 D4, E4 F4 G4]; // two voices, 2-against-3
let alt = <C4 D4 E4>; // C4, then D4, then E4 — one per cycle
let poly = {C4 D4 C4 E4}%3; // three steps per cycle, phasing over four
let with_rest = [C4 _ E4 _]; // notes on slots 1 and 3

Postfix timing shorthand on a single element. At most one per element.

TokenNameEffectExampleEquivalent
*nFastPlay n times within the slot (speeds up)bd*2[bd bd]
/nSlowStretch the element over n cycles in the slot[C4 D4]/2spans 2 cycles
@nWeightTake an share of the cycle (plays once, longer)bd@2 sdbd 2/3, sd 1/3
!nReplicateExpand into n separate slots at normal speedbd!3bd bd bd
let fast = [bd sd*2]; // sd plays twice inside its half
let slow = [<C4 D4>/2 E4]; // the alternation advances every 2 cycles
let weighted = [C4@3 D4]; // long C4, quick D4
let replicate = [bd!4]; // same as [bd bd bd bd]

*n, /n, and @n accept decimals (*1.5, @2.5); !n takes integers only.

Postfixes that shape what an element plays. These combine with each other and with a modifier.

TokenNameMeaning
^vVelocityStrike velocity 0127, e.g. C4^120.
(k,n)Euclideank pulses spread over n steps.
(k,n,r)Euclidean + rotAs above, rotated by r steps.
Root:QualityChordA chord, e.g. C4:maj7; add ~i for inversion i (C4:maj7~1).
^NScale degreeDegree N of the current scale/key (see Music Theory).
^N:QualityDegree chordA chord built on scale degree N.
.method(…)Sample methodTransform a sample hit; chains, e.g. bd.vel(1.2).pan(0.5).
let accented = [C4^120 C4^60 C4^60 C4^60]; // accent on beat 1
let euclid = [bd(3,8) sd(5,8,2)]; // euclidean kick + rotated snare
let chords = [D4:min7 G4:7 C4:maj7~1]; // ii–V–I, last chord inverted
let degrees = [^1 ^3 ^5 ^3]; // arpeggio over the current scale
let shaped = [bd.vel(1.2) sd.pitch(-5).pan(0.5)];

When several postfixes attach to one element they appear in a fixed order:

element velocity euclid modifier
C4 ^80 (3,8) *2

So C4^80(3,8)*2 is valid; reordering the postfixes is not.

What can sit in a slot:

KindExamplesNotes
NoteC4, F#3, Bb-1, G9Scientific pitch; octaves -19 (C4 = MIDI 60).
Number60, -5, 0.5Raw values for numeric patterns and automation.
Samplebd, sd, hhKit sample names; accept .method(…) postfixes.
ChordC4:maj, A3:min7See the chord qualities table.
Scale degree^1, ^-3, ^5:minResolved against the active scale/key.
Rest_Silence for one slot.