Chapter 2

Mini-notation

The little language inside the quotes. One string, one cycle.

Items separated by spaces share the cycle equally, and ~ is a rest. Each figure below is drawn from the events the pattern actually makes.

note("c3 e3 g3 b3")
note("c3 ~ g3 ~")

The syntax

WriteMeans
[a b]a group: the pair shares one step
a b, c da stack: layers that play at once
<a b c>one per cycle, in turn
a*4 · a/2four in the step · one stretched over two cycles
a!3three steps of a
a@3 ba takes three times the room of b
a _ _a tie: _ holds the note before it
a.e(3,8)Euclidean: three hits spread over eight steps
a? · a?0.3sometimes dropped (half the time · 30%)
a|b|cone of them, picked each cycle
r · i(0,7) · prandom 0..1 · random whole number · slow random drift
(c2 + 12)arithmetic; a note name is its MIDI number
note("c3 [e3 g3] ~ b3")
note("c3 <e3 g3>")
note("c3*3 e3")
note("c3@3 e3")
note("c3 _ _ e3")
note("c3.e(3,8)")
note("c3 e3, g2*3")

They nest: "<[0 2] [3 5]>*2" does what it looks like. Any number in them can be a pattern too, like a*<2 3> or a.e(<3 5>,8).

kick: s("bd [~ bd] ~ bd").postgain(0.2)
snare: s("~ sd ~ <sd [sd cp]>").postgain(0.2)
hat: s("hh*8?0.2, ~ oh").postgain(0.2)
rim: s("rim.e(3,8)").vel(0.6).postgain(0.2)
random, but repeatable ?, |, r, i and p give the same answer every time a given cycle comes round, so the playback highlight always agrees with what you hear.
Small print

Inside ( … ), * glued to a value is still fast (2*4), but with spaces it multiplies (2 * 4). Put a space before a minus sign. Polymeter, {a b, c d}, is not supported.

Mini-notation is what a string in double quotes or backticks means where a pattern goes. A single-quoted string is plain text. See Making it yours.