Clave, Tresillo and Syncopated Frameworks
Learning objectives
- learner can build son and bossa clave, tresillo and its extensions
- learner can use clave as a combinatorial framework and adapt it at double speed
- learner can apply the bell-timeline standard pattern to program a syncopated groove
Capstone — one whole task that evidences the objectives
Program a two-bar syncopated groove built on a clave/tresillo framework: state whether it is 2-3 or 3-2, add a bossa variation, double-time one bar, and layer the sub-Saharan standard-pattern bell timeline over it.
Prerequisite modules
This module builds toward the single most transferable skill in groove programming: running a set on a Latin-derived rhythmic framework instead of a straight grid. In a live-coding rig, a two-bar clave loop is what keeps a house, reggaeton, or Afro-pop set feeling alive while everything else mutates around it — and being able to say out loud “this is 2-3” is what lets you layer new parts without rhythmic train wrecks.
Start supported: sequence the son clave in both orientations against a steady kick, feeling how the asymmetric hit groupings (“Son clave is a two-bar framework pattern”) lean against the pulse you internalized in the prerequisite module. Then compress it — loop the three-hit half into the one-bar 3+3+2 tresillo, and stretch that into the 16-step double tresillo when a bassline needs a longer cycle. Next, sophisticate: shift the final hit off-beat for the bossa variant, and squeeze the whole two-bar shape into one bar at double speed for faster genres. The combinatorial principle — alternating clave variants within a loop to lengthen the cycle — is what turns these isolated patterns into a framework you can improvise inside.
The capstone gates on every required atom: you cannot state 2-3 vs 3-2 without the son clave, add the bossa variation without its off-beat shift, double-time a bar without the double-speed adaptation, extend the framework without tresillo and its 3-3-3-3-2-2 extension, combine variants coherently without the combinatorial principle, or layer the E(7,12) bell timeline without the Standard Pattern itself. The supporting atoms enrich rather than gate: syncopation explains why misplaced accents generate the tension you are exploiting, and rhythmic motives frame tresillo as a reusable cell you will vary far beyond this module.
Walkthrough
The clave is the rhythmic key that unlocks Afro-Cuban, Brazilian, and a huge slice of dance music — a fixed, asymmetric two-bar pattern everything else leans against. You’ll program it, vary it, and layer the West-African bell over it. At strudel.cc, Ctrl-Enter plays, Ctrl-. stops. Each fence is a complete groove; a 16-step cycle here spells the whole two-bar clave, and ~ is a rest.
1 — son clave, 3-2. The son clave has a “three side” (three hits) and a “two side” (two hits). Named 3-2 when the three-side comes first. Lay it in rimshots over a four-on-the-floor kick and feel it pull against the steady pulse ([[son-clave]]).
setcpm(100/4)
$: sound("bd*4").bank("RolandTR909").gain(0.9)
$: sound("rim ~ ~ rim ~ ~ rim ~ ~ ~ rim ~ rim ~ ~ ~").bank("RolandTR909")
2 — the tresillo cell. Compress the three-side into one bar and you get the tresillo: 3+3+2, the most common syncopation on earth (reggaeton, trap, house all ride it). Three evenly-felt hits crossing a four-beat bar ([[tresillo]]).
setcpm(100/4)
$: sound("hh*8").bank("RolandTR909").gain(0.4)
$: sound("bd ~ ~ bd ~ ~ bd ~").bank("RolandTR909")
3 — 2-3 vs 3-2 (orientation matters). Swap the two halves and the same hits become 2-3 clave — the two-side leads. Which orientation you’re in decides how melodies and bass should phrase against it; getting it backwards is the classic “out of clave” mistake ([[clave-as-combinatorial-tool]]).
setcpm(100/4)
$: sound("bd*4").bank("RolandTR909").gain(0.8)
$: sound("~ ~ rim ~ rim ~ ~ ~ rim ~ ~ rim ~ ~ rim ~").bank("RolandTR909")
4 — the bossa variation. Brazilian bossa nova shifts the two-side’s last hit, giving a smoother, rounder feel. One token moves — from step 13 to step 14 — and the whole groove changes nationality ([[bossa-clave]]).
setcpm(100/4)
$: sound("bd*4").bank("RolandTR909").gain(0.8)
$: sound("rim ~ ~ rim ~ ~ rim ~ ~ ~ rim ~ ~ rim ~ ~").bank("RolandTR909")
5 — layer the bell timeline. The sub-Saharan standard pattern — a 12-pulse bell, E(7,12) — is the ancestor of clave. Layered over the clave (16 vs 12 pulses) it creates a rich cross-rhythm; here as claps under the rimshot clave ([[standard-pattern-bell-timeline]]).
setcpm(100/4)
$: sound("bd*4").bank("RolandTR909").gain(0.8)
$: sound("rim ~ ~ rim ~ ~ rim ~ ~ ~ rim ~ rim ~ ~ ~").bank("RolandTR909").gain(0.85)
$: sound("cp ~ cp cp ~ cp ~ cp cp ~ cp ~").bank("RolandTR909").gain(0.5)
6 — the two-cycle framework (the capstone). The combinatorial move: alternate son and bossa claves cycle-to-cycle with <...>, layer the bell, and drop a double-time hi-hat fill at the turnaround. A living clave framework you can improvise a bassline inside ([[clave-double-speed]], [[double-tresillo]]):
setcpm(100/4)
$: sound("bd*4").bank("RolandTR909").gain(0.85)
$: sound("<[rim ~ ~ rim ~ ~ rim ~ ~ ~ rim ~ rim ~ ~ ~] [rim ~ ~ rim ~ ~ rim ~ ~ ~ rim ~ ~ rim ~ ~]>").bank("RolandTR909")
$: sound("cp ~ cp cp ~ cp ~ cp cp ~ cp ~").bank("RolandTR909").gain(0.45)
$: sound("~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [hh hh] hh").bank("RolandTR909").gain(0.4)
What good sounds like. A clave groove should feel like it leans — the syncopated hits create tension against the four-on-the-floor kick, and the two sides breathe differently (busy three-side, spacious two-side). The beginner failure is playing “out of clave”: a bassline or melody that accents the wrong side, so the whole thing fights itself. Keep the kick dead straight so the clave has something to pull against, and commit to one orientation per section. (Skill map: live-coder Domain B1 — groove and syncopation used musically, not just Euclidean toys.)
Now make it yours. Move a bassline note(...) onto the three-side hits and hear it lock in. Try .swingBy(1/3, 4) for a Latin-jazz lilt. Double-time the whole clave with .fast(2) for footwork tempos. Replace cp bell with a ~-sparse cowbell (cb). Add a conga layer on the off-beats the clave leaves empty.
Runnable examples
Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.
syncopation
Pbind(\degree, Pseq([0, 4, 7], inf), \dur, 0.5, \amp, Pseq([0.4, 0.1, 0.1, 0.1], inf)).play
supercollider-0036 · CC0
Atoms in this module
Required — these gate the capstone
Supporting — enrichment, not gating
Part of curricula
- DJ / Selector — from track selection to a mixed set — Beatmatch and mix: a clean recorded mix optional
- Electronic Music Producer — from raw sound to a released track — Design your palette — synthesis and groove recommended
- Live Coder — zero to performing live-coded music — Patterns, Grooves & Voices optional
- Sampling Artist — from crate-digging to a curated sample practice — Capture and chop your own material optional
Unlocks — modules that require this one