CPS
🏆 Phase 1 Complete!
1.1 Pattern Fundamentals
sound() + n() - Sample Numbers
sound("bd sn").n("0 1 2")
note() - Musical Notes
sound("arpy").note("c e g c")
up() - Transpose Semitones
sound("arpy").note("c e g").up("0 12 7")
freq() - Direct Frequency
sound("sine").freq("440 554 659")
midinote() - MIDI Notes
sound("arpy").midinote("60 64 67")
1.2 Time Transforms
every() - Every N Cycles
sound("bd sn bd sn")
.every(4, x => x.fast(2))
sometimes() - 50% Random
sound("bd sn bd sn")
.sometimes(x => x.gain(0.3))
often() - 75% Chance
sound("hh hh hh hh")
.often(x => x.lpf(800))
rarely() - 25% Chance
sound("bd sn bd sn")
.rarely(x => x.rev())
density() - Speed Without Pitch
sound("bd sn cp").density(1.5)
whenmod() - Conditional
sound("bd sn bd sn")
.whenmod(8, 0, x => x.fast(2))
1.3 Audio Effects
lpf() - Low Pass Filter
sound("hh*8").lpf(800)
hpf() - High Pass Filter
sound("bd sn bd sn").hpf(200)
bpf() - Band Pass Filter
sound("arpy*4").bpf(1000)
delay() - Echo Effect
sound("cp ~ cp ~").delay(0.25)
reverb() - Reverb Effect
sound("bd sn").reverb(0.4)
distortion() - Distort
sound("bd sn bd sn").distortion(5)
crush() - Bit Crushing
sound("arpy*4").crush(4)
vowel() - Vowel Filters
sound("saw").note("c e g").vowel("a")
1.4 Composition
cat() - Sequential Patterns
cat([
sound("bd sn"),
sound("hh cp")
])
append() - Sequential Append
sound("bd").append("sn").append("cp")
superimpose() - Layer Transform
sound("bd sn bd sn")
.superimpose(x => x.fast(2).up(12))
overlay() - Layer Simultaneous
sound("bd ~ bd ~")
.overlay("~ sn ~ sn")
layer() - Multiple Layers
layer([
sound("bd ~ bd ~"),
sound("~ sn ~ sn"),
sound("hh hh hh hh").gain(0.3)
])
🔥 Advanced Combos
Epic Live Coding Pattern
sound("bd sn cp hh")
.every(4, x => x.fast(2))
.superimpose(x => x.up(12).vowel("i"))
.overlay("arpy arpy*4")
.note("c e g a")
.lpf(800)
.reverb(0.3)
Complex Multi-Layer
stack([
sound("bd ~ bd ~")
.every(8, x => x.fast(2))
.sometimes(x => x.distortion(3)),
sound("~ sn ~ sn")
.superimpose(x => x.delay(0.125))
.often(x => x.gain(1.2)),
sound("hh*4")
.rarely(x => x.rev())
.lpf(1200)
.gain(0.4)
])
Melodic + Rhythmic Combo
layer([
sound("arpy").note("c e g c")
.superimpose(x => x.up(12).vowel("i"))
.every(4, x => x.fast(1.5))
.reverb(0.4),
sound("bd sn bd sn")
.overlay("hh hh hh hh")
.sometimes(x => x.crush(6))
])
✅ Phase 1 Functions (34/34):
- Patterns: sound(), n(), note(), up(), freq(), midinote()
- Time: fast(), slow(), rev(), density(), every(), sometimes(), often(), rarely(), almostNever(), almostAlways(), whenmod()
- Effects: gain(), pan(), lpf(), hpf(), bpf(), delay(), reverb(), distortion(), crush(), vowel()
- Compose: stack(), struct(), cat(), append(), superimpose(), overlay(), layer()
💡 Pro Tips:
- Use
every()
for structured variations - Combine
superimpose()
+overlay()
for complex textures append()
creates sequences,overlay()
creates layersvowel()
works great with melodic patterns- Chain multiple
sometimes()
for unpredictable results
🎹 Keyboard Shortcuts:
Ctrl+Enter
- Play patternEscape
- Stop all- Click examples to load them