a time range, get back Haps ˒ Pa tt erns compose: each method returns a new Pa tt ern ˒ `.gain(0.8)` → wraps original, adds gain to every Hap ˒ `.s("sine")` → sets the sound source ˒ `stack(a, b)` → queries both, concatenates Haps Pa tt ern Composition
= cycles per second (CPS) ˒ `setcpm(120/4)`→ 30 CPM → 0.5 CPS → 1 cycle = 2 seconds ˒ Positions are Rational numbers (not Float) ˒ Each event is a Hap (from "Happening") ˒ When: the time span of the event ˒ What: the value to play Cycle, Time, and Hap
b4>*8") # .s("sawtooth") # .gain(0.3) # } # mute! _track(:arp) { note("<c4 e4 g4 b4>*8") .s("sawtooth") .gain(0.3) } # mute! You want to silence the arpeggio for a few bars.
[OK] ─ ─ → swap in the new pattern │ └ ─ [NG] ─ ─ → keep the old pattern running + print error to console Key points: - Both OK and NG paths lead to "sound keeps playing" - Silence is not an acceptable failure mode