Skip to main content
A pattern value holds lines that start together and repeat. A block holds lines that play once. Both require an explicit type before the name: pattern groove = { ... } or block myBlock = { ... }. An untyped myBlock = { ... } is an error and defines nothing. Declaring either plays nothing. play renders it.

Duration

Each line repeats at its own length, and the pattern lasts until they end together: the least common multiple of their lengths. Above, the floor tom repeats every 3 steps, the kick every 4 and the snare every 5, so they meet after 60 steps: three bars of 5 over 4. A line that ends in ... has no length of its own and doesn’t count. A length in front sets the duration instead: pattern groove = 4 bars { ... }. Everything inside must then fit it a whole number of times, and the error names the shortest length that would. A pattern whose lines don’t meet within 64 bars needs a length.

Groups

A named block plays its instrument lines once, even when a repeating pattern beside or around it runs longer. A longer play leaves silence after the block rather than repeating it. Use a pattern when the material should loop. ( ) holds what plays in order: names, blocks, other groups, and lines of their own, one after another, separated by spaces or new lines. It is the one way to put things in order. On lines of their own, things play together, and two things on one line without brackets are an error. See Blocks. A length in front of a name or a group repeats it for that long; in front of braces it is the block’s own length, which comes to the same thing, and is what a block of lines ending in ... needs. A group can run over several lines, and a line of its own in it plays as a block of one line. A pattern can hold another by name, on a line of its own, and its value can be a group.

bar

bar <n> { ... } adds lines to bar n of the pattern or play it is in, every time through. bar 3 to 4 { ... } covers a range. It adds to what plays and silences nothing. Where it hits the same kit piece or instrument at the same moment as a line above, it wins. This is The Sound of Muzak by Porcupine Tree. The lines of groove meet after two bars, so the pattern is two bars long and the fill closes every pass.

every

every <length> in front of a line or block sets how long one step lasts inside it. This is Gavin Harrison’s paradiddle challenge. every 3 steps makes each of the feet’s steps three sixteenth notes long, so the feet play the paradiddle three times slower than the hands. every changes the steps of kit pieces and instruments alike. Beats and chords keep their timing, and lines outside it keep their own step.