One session, built from a single kick drum to a full arrangement, one line at a time — with the reasoning for each move. Every line here is runnable as written.

1. Before you start

This session uses PerformerSuperDirt because its sample names are the most widely recognisable. Everything works identically on other backends — only the instrument keys change.

p := Performance uniqueInstance.
p performer: PerformerSuperDirt new.
p freq: 124 bpm.
p play.

The transport is now running with nothing on it — silence, but a live clock. Every line from here is evaluated while it plays.

Keep them separate Put each line in the Playground on its own row and fire them individually with Cmd-D. That is the working method the whole design assumes.

2. Laying a foundation

16 downbeats to: #bd.

Four to the floor. Unglamorous, but it establishes where beat one is, which every later decision depends on.

Now a backbeat. Rather than writing an array by hand, invert the kick:

#( 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 ) asSeq to: #sn.

And a hat to carry the subdivision:

16 quavers to: #hh.
Why quavers and not semiquavers 16 semiquavers puts a hat on every step, which at 124 BPM is a wall. Eighth notes leave room for the parts that come next. You can always thicken it later.

3. Finding a groove

Straight four-to-the-floor is a grid, not a groove. Replacing the snare with a clave gives the bar an internal shape:

16 claveSon to: #cp.

Now try the other clave and listen to the difference — one stroke moves, and the whole feel changes:

16 rumba to: #cp.

The son clave places its third stroke on step 7; the rumba clave puts it on step 8, a half-pulse later, which pushes harder against the kick. Keep whichever you prefer.

Offsetting the hat against the kick opens the pattern up further:

16 quavers offset: 1; to: #hh.
Change one thing at a time The reason to fire lines individually is that you can hear what each one did. Swapping two parts at once and liking the result teaches you nothing about which change caused it.

4. Adding a bass

A bass part needs both a rhythm and pitches. The habanera/tumbao cell is a natural fit against a clave:

(16 tumbao notes: #( 36 36 43 41 )) to: #bass.

Four notes across the pattern's five triggers, so the notes wrap and the figure shifts each time round — a small amount of variation for free.

Give it a harmonic journey with progression::

(16 tumbao notes: #( 36 36 43 41 ))
  progression: #( 0 0 5 7 ); to: #bass.

That repeats the figure four times, transposed by 0, 0, 5 and 7 semitones — a I–I–IV–V movement, and a 64-step part built from a 16-step one.

The bass is now four times as long progression: concatenates, so this part wraps every 64 steps while the drums wrap every 16. That is intentional here, but it is worth knowing which of your parts are long — see Rhythms: Basics §8.

5. A melody that changes

A fixed melody gets old quickly. A random walk stays in the scale but takes a different route every time you evaluate it:

(16 quavers notes: (8 randomWalksOn: Scale pentaMinor octaves: 2 root: 60))
  to: #arpy.

Re-evaluate that line whenever the melody stales. The pentatonic minor keeps it consonant against almost anything.

For a part that varies without you touching it, use a Mondo alternation instead — the bracketed choice advances one per cycle:

'c4 <e4 g4> a4 <c5 b4 g4>' asMondoNotes to: #arpy.
Mondo needs the cyclic transport Alternations advance per cycle, so they only move under playCyclicFor:. If you are on play, the first choice repeats — see Performing §2.1.

6. Building tension

Three moves, in rough order of size.

Thin it out. Solo the bass and let the room breathe:

p temporarySave.    "snapshot first, so you can get back"
p solo: #bass.

Bring it back and lift it.

p restore.
p freq: 128 bpm.

Then the big gesture — put every part onto one rhythm:

p rhythm: 16 tresillo.

Everything hits together on 3+3+2. It is blunt and extremely effective, and you undo it by re-sending the parts you want back:

16 downbeats to: #bd.
16 quavers offset: 1; to: #hh.

For a change of texture rather than of rhythm, switch the kit to jungle:

32 jungleKick  to: #bd.
32 jungleSnare to: #sn.
32 jungleRim   to: #hh.
Those three are 32 steps The jungle patterns are twice the length of everything else here. That is what gives them their half-time feel, but give them 32 rather than 16 or they truncate.

7. The finished session

Everything above, in one place:

"--- setup ------------------------------------------------"
p := Performance uniqueInstance.
p performer: PerformerSuperDirt new.
p freq: 124 bpm.
p play.

"--- drums ------------------------------------------------"
16 downbeats to: #bd.
16 rumba     to: #cp.
16 quavers offset: 1; to: #hh.

"--- bass -------------------------------------------------"
(16 tumbao notes: #( 36 36 43 41 ))
  progression: #( 0 0 5 7 ); to: #bass.

"--- melody -----------------------------------------------"
(16 quavers notes: (8 randomWalksOn: Scale pentaMinor octaves: 2 root: 60))
  to: #arpy.

"--- moves ------------------------------------------------"
p temporarySave.
p solo: #bass.
p restore.
p rhythm: 16 tresillo.
p freq: 128 bpm.

"--- out --------------------------------------------------"
p mute: #( #arpy #hh ).
p stop.
Make it yours Swap rumba for any of the 31 rhythms in the Rhythm Library, or pentaMinor for any scale in Melody & Scales. The structure holds while the material changes completely.

8. Where to go next

DocumentWhat it covers
GalleryMore complete patterns, each runnable as written.
Rhythms: AdvancedEuclidean patterns, Mondo notation and transforms.
Melody & ScalesScales, chords and generated melodies.
PerformingThe live moves used in §6, in full.

9. Troubleshooting

The bass drifts out of phase with the drums

It is 64 steps after progression: while the drums are 16. They realign every four bars, which is the intended effect — §4.

p restore brought back more than I expected

Restore reinstates the whole snapshot. Take the snapshot immediately before the move you mean to undo — see Performing §4.1.

The Mondo melody never changes

Alternations need playCyclicFor: rather than play — §5.

The jungle section sounds wrong against the bass

32-step drums against a 64-step bass line up fine; against 16-step parts they do not. Give everything in that section a multiple of 32 — §6.

The random melody is too wide

Lower octaves: to 1, or use fewer notes so the walk has less room to wander — §5.

I want the old melody back after re-evaluating

A random walk is generated fresh each time and the previous one is gone. If you find one you like, inspect the Sequencer's notes and paste them in as a literal array.