Strudel Reference

SkillMedia

Create music with Strudel live coding syntax. Use when the user asks to play a song, make music, create beats, patterns, or sounds.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Strudel Reference skill

What this skill tells your AI

The instructions your AI receives, as published by renatoworks/strudel-claude in .claude/skills/strudel/SKILL.md and read by ahel’s review.

Quick reference for Strudel syntax. Not exhaustive - experiment and discover.


The Basics

Everything happens in cycles (≈2 seconds by default).

$: s("bd")           // One kick per cycle
$: s("bd*4")         // Four kicks per cycle
$: s("bd sd bd sd")  // Sequence: kick-snare-kick-snare
$: s("bd*4, hh*8")   // Layers: kick AND hats together

Mini-Notation Cheatsheet

SymbolMeaningExample
*nRepeat n timeshh*4
/nSlow down n times[c d e f]/2
[ ]Group (subdivide)[bd sd] hh
< >Alternate each cycle<bd sd cp>
,Play in parallel (stack)bd, hh*2
~ or -Rest (silence)bd ~ sd ~
?50% chance to playhh*8?
(n,m)Euclidean rhythmbd(3,8)
@nElongate (weight)c@3 e
!nReplicatebd!3 sd
|Random choicebd | sd | cp
:nSample numberhh:2

Sounds

Basic Drums: bd sd hh cp oh rim lt mt ht cr rd cb

Drum Banks (classic): .bank("RolandTR909") .bank("RolandTR808") .bank("RolandTR707")

Drum Machines Catalog

Use with sample pattern: s("tr808_bd tr808_sd tr808_hh") or with :n for variations: s("tr808_bd:0 tr808_bd:5")

ROLAND (The Classics)

MachineSoundVibe
tr80825 kicks, 25 snares, 5 toms eachTHE hip-hop/electro sound
tr9094 kicks, 16 snares, 9 toms eachTHE house/techno sound
tr7072 kicks, 2 snaresClean 80s digital
tr6061 eachAcid house companion
tr6262 kicks, 3 snares, 8 percsLatin percussion
tr5051 each, 3 percsBudget 80s
tr72710 percs, 2 shakersLatin percussion only
mc30316 kicks, 26 snares, 39 percsGroovebox monster
r87 kicks, 12 snares, 8 percsPro 90s workstation
d1103 snares, 3 percsLA Synthesis module
d704 kicks, 5 snares90s workstation
system10015 kicks, 21 snares, 19 percsModular analog
sh0943 kicksSynth bass drums

LINN (The Originals)

MachineSoundVibe
linndrum1 kick, 3 snares, 3 hats, 6 percsPrince, 80s pop legend
lm1 / linnlm14 kicks, 1 snare, 3 percsFirst real drum machine
lm2 / linnlm24 kicks, 4 snaresLM-1 successor
linn9000 / 90002 crashes, 2 toms each, 3 percsSampling pioneer
linn / akailinnFull kitAkai recreation

OBERHEIM

MachineSoundVibe
dmx / oberheimdmx3 kicks, 3 snaresNew Order, early hip-hop

E-MU

MachineSoundVibe
sp12 / emusp1214 kicks, 21 snares, 6 toms eachSampling legend
drumulator / emudrumulator1 eachBudget classic
emumodular2 kicks, 2 percsModular weirdness

YAMAHA

MachineSoundVibe
rm50 / yamaharm50103 kicks, 108 snares, 56 percsMASSIVE library
ry30 / yamahary3013 kicks, 21 snares, 13 percsAWM synthesis
rx5 / yamaharx52 kicks, 3 snares, FXFM drums
rx21 / yamaharx211 eachBudget FM
tg33 / yamahatg334 kicks, 5 snares, 12 percsVector synthesis

KORG

MachineSoundVibe
m1 / korgm13 kicks, 4 snares, 16 misc, 7 percsWorkstation king
minipops / korgminipops7 kicks, 13 snaresVintage analog
kpr77 / korgkpr771 eachPreset rhythm
kr55 / korgkr551 each, 2 percsAnalog preset
ddm110 / korgddm1101 kick, 2 toms eachDigital
poly800 / korgpoly8004 kicksSynth kicks
t3 / korgt35 kicks, 5 snares, 4 percsWorkstation
krz / korgkrz2 snares, 2 FXTrinity/Triton

BOSS

MachineSoundVibe
dr110 / bossdr1101 eachCompact analog
dr220 / bossdr220Full kit + percDigital 80s
dr55 / bossdr552 kicks, 8 snares, 2 hatsDr. Rhythm
dr550 / bossdr5505 kicks, 6 snares, 11 percsPro 90s

ALESIS

MachineSoundVibe
hr16 / alesishr161 each, 8 percs, 3 shakers80s digital
sr16 / alesissr1613 kicks, 12 snares, 7 percsStudio staple

SEQUENTIAL CIRCUITS

MachineSoundVibe
circuitsdrumtracks1 eachEarly digital
circuitstom2 hi tomsTom module

AKAI

MachineSoundVibe
mpc60 / akaimpc602 kicks, 3 snares, 5 percsHip-hop legend
mpc10005 kicks, 4 snaresModern MPC
xr10 / akaixr1010 kicks, 10 snares, 15 percsXR series

CASIO

MachineSoundVibe
rz1 / casiorz11 each, 2 ridesSampling keyboard
sk1 / casiosk11 eachToy sampling
vl1 / casiovl11 eachVL-Tone

SIMMONS

MachineSoundVibe
sds5 / simmonssds512 kicks, 21 snares, 7 rimsElectronic drum pads
sds400 / simmonssds4003 snares, 8 mid toms, 6 lo tomsTom heaven

OTHER GEMS

MachineSoundVibe
spacedrum / viscospacedrum11 kicks, 6 hats, 7 hi tomsWeird analog
dpm48 / sakatadpm483 kicks, 2 snares, 2 percsSakata
compurhythm788 percs, 4 miscRoland CR-78
compurhythm1000Full kit, 3 percsRoland CR-1000
compurhythm8000Full kit, 2 percsRoland CR-8000
mfb5121 eachGerman analog
sergemodular5 percsSerge modular
mridangam_*South Indian percussiondhi, dhin, ka, ta, thom, etc.

Sample Counts Key: Numbers in parentheses indicate variations available via :n

// Classic 808 kit
s("tr808_bd tr808_sd:3 tr808_hh*2 tr808_oh").gain(0.8)

// Mix machines for unique kits
s("tr909_bd linndrum_sd tr808_hh dmx_cp")

// Explore variations
s("tr808_bd:<0 5 10 15 20>") // cycle through 808 kick variations

// Lo-fi with SP-12
s("sp12_bd sp12_sd:5 sp12_hh").lpf(2000).room(0.4)

// Yamaha RM50 has EVERYTHING
s("rm50_bd:50 rm50_sd:30 rm50_perc:20")

Synthesizers

Basic Waveforms:

SoundAliasDescription
sinesinPure tone, smooth
triangletriSoft, flute-like
sawtoothsawBright, buzzy - classic synth
squaresqrHollow, clarinet-like
supersaw-Detuned saws - huge pads
pulse-Variable width square

Noise Sources:

SoundCharacter
whiteFull spectrum hiss
pinkWarmer, less harsh
brownDeep rumble

Z-Oscillators (aliased/lo-fi): z_sine z_sawtooth z_square z_triangle z_tan z_noise

Other Synths:

SoundDescription
zzfxZzFX game audio synth
bytebeatAlgorithmic 8-bit
crackleVinyl crackle noise

Wavetables

// Wavetable synthesis
s("wt_digital:2").note("c3 e3 g3 c4")
WavetableVariationsVibe
wt_digital5Digital textures
wt_digital_bad_day1Moody digital
wt_digital_basique1Simple digital
wt_digital_crickets1Insect-like
wt_digital_curses1Harsh digital
wt_digital_echoes1Spacey
wt_vgame11Video game sounds

GM Instruments (General MIDI)

All have multiple velocity layers (number in parentheses). Use :n for variations.

Pianos (Keys):

SoundLayersCharacter
gm_piano32Acoustic grand
gm_epiano111Rhodes-style
gm_epiano29DX7-style
gm_harpsichord8Baroque
gm_clavinet4Funky

Chromatic Percussion:

SoundLayers
gm_celesta6
gm_glockenspiel5
gm_music_box5
gm_vibraphone6
gm_marimba7
gm_xylophone6
gm_tubular_bells6
gm_dulcimer5

Organs: gm_drawbar_organ gm_percussive_organ gm_rock_organ gm_church_organ gm_reed_organ gm_accordion gm_harmonica gm_bandoneon

Guitars: gm_acoustic_guitar_nylon gm_acoustic_guitar_steel gm_electric_guitar_jazz gm_electric_guitar_clean gm_electric_guitar_muted gm_overdriven_guitar gm_distortion_guitar gm_guitar_harmonics

Bass: gm_acoustic_bass gm_electric_bass_finger gm_electric_bass_pick gm_fretless_bass gm_slap_bass_1 gm_slap_bass_2 gm_synth_bass_1 gm_synth_bass_2

Strings: gm_violin gm_viola gm_cello gm_contrabass gm_tremolo_strings gm_pizzicato_strings gm_orchestral_harp gm_timpani

Ensemble: gm_string_ensemble_1 gm_string_ensemble_2 gm_synth_strings_1 gm_synth_strings_2 gm_choir_aahs gm_voice_oohs gm_synth_choir gm_orchestra_hit

Brass: gm_trumpet gm_trombone gm_tuba gm_muted_trumpet gm_french_horn gm_brass_section gm_synth_brass_1 gm_synth_brass_2

Reeds: gm_soprano_sax gm_alto_sax gm_tenor_sax gm_baritone_sax gm_oboe gm_english_horn gm_bassoon gm_clarinet

Pipes: gm_piccolo gm_flute gm_recorder gm_pan_flute gm_blown_bottle gm_shakuhachi gm_whistle gm_ocarina

Synth Leads: gm_lead_1_square gm_lead_2_sawtooth gm_lead_3_calliope gm_lead_4_chiff gm_lead_5_charang gm_lead_6_voice gm_lead_7_fifths gm_lead_8_bass_lead

Synth Pads: gm_pad_new_age gm_pad_warm gm_pad_poly gm_pad_choir gm_pad_bowed gm_pad_metallic gm_pad_halo gm_pad_sweep

Synth FX: gm_fx_rain gm_fx_soundtrack gm_fx_crystal gm_fx_atmosphere gm_fx_brightness gm_fx_goblins gm_fx_echoes gm_fx_sci_fi

Ethnic: gm_sitar gm_banjo gm_shamisen gm_koto gm_kalimba gm_bagpipe gm_fiddle gm_shanai

Percussive: gm_tinkle_bell gm_agogo gm_steel_drums gm_woodblock gm_taiko_drum gm_melodic_tom gm_synth_drum gm_reverse_cymbal

Sound FX: gm_guitar_fret_noise gm_breath_noise gm_seashore gm_bird_tweet gm_telephone gm_helicopter gm_applause gm_gunshot

// Switch between sounds (space = alternate)
note("c d e f").sound("piano gm_electric_guitar_muted")

// Stack sounds (comma = layer together)
note("c d e f").sound("piano, gm_electric_guitar_muted")

// FM Synthesis
.fm(4)            // FM modulation index
.fmh(2)           // FM harmonicity ratio

// Vibrato
.vib(4)           // Vibrato speed (hz)
.vibmod(0.5)      // Vibrato depth (semitones)

Samples Catalog

High-quality multi-sampled instruments. Numbers show available variations.

Pianos & Keys:

SampleVariationsCharacter
piano29Acoustic grand
piano122Alternative piano
steinway42Concert grand
fmpiano22FM synthesis piano
kawai37Kawai grand
clavisynth19Clavinet-style synth

Strings & Harps:

SampleVariations
folkharp29
harp23
psaltery_bow11
psaltery_pluck11
psaltery_spiccato11
strumstick19

Mallet Instruments:

SampleVariationsCharacter
kalimba11Thumb piano
kalimba2 - kalimba514-25More kalimbas
marimba10Wooden bars
glockenspiel7Metal bells
vibraphone11Jazz vibes
vibraphone_bowed6Bowed vibes
vibraphone_soft11Soft mallets
xylophone_hard_ff8Hard mallets loud
xylophone_soft_pp8Soft mallets quiet
balafon6African xylophone
balafon_hard / _soft6Articulation variants
tubularbells9Orchestral chimes
tubularbells211Alternative
handbells3Hand bells
handchimes19Wind chimes
belltree6Bell tree
wineglass4Rubbed glass

Wind Instruments:

SampleVariations
recorder_soprano_sus13
recorder_soprano_stacc12
recorder_alto_sus12
recorder_alto_vib12
recorder_tenor_sus13
recorder_bass_sus12
ocarina11
ocarina_small10
ocarina_vib10
harmonica9
harmonica_soft10
harmonica_vib10
sax23
sax_stacc23
sax_vib19
saxello8
super6413 (chromatic harmonica)

Organs:

SampleVariations
organ_4inch27
organ_8inch27
organ_full27
pipeorgan_loud21
pipeorgan_quiet21
pipeorgan_loud_pedal11
pipeorgan_quiet_pedal11

Percussion - Pitched:

SampleVariations
timpani30
timpani_roll10
timpani2204 (!)
slitdrum6

Percussion - Drums:

SampleVariations
bassdrum18
bassdrum230
snare_hi8
snare_low20
snare_modern72
snare_rim4
tom_stick8
tom_mallet8
tom_rim6
tom2_stick / mallet / rim6-8
hihat15
clap10
jazz8 (jazz kit)

Percussion - World:

SampleVariationsOrigin
bongo28Latin
conga34Latin
cajon18Flamenco
darbuka20Middle Eastern
framedrum18World
tambourine7Universal
tambourine27Alternative
agogo5Brazilian
shaker_large6Universal
shaker_small16Universal
cabasa6Latin
cowbell13Universal
clave6Latin
guiro5Latin

Percussion - Metals:

SampleVariations
sus_cymbal25
sus_cymbal223
clash10
clash25
triangles37
fingercymbal1
gong7
gong26
sleighbells6
anvil9
metal10
brakedrum17

Percussion - Wood & Effects:

SampleVariations
woodblock10
marktrees6
ratchet8
slapstick5
vibraslap4
flexatone8
oceandrum3

Asian Instruments:

SampleVariationsOrigin
dantranh17Vietnamese zither
dantranh_tremolo16With tremolo
dantranh_vibrato16With vibrato
didgeridoo12Australian

Sound Effects:

SampleVariations
space18
siren5
trainwhistle6
ballwhistle2
wind10
crow4
insect3
casio3
east9
num21
numbers9
// Multi-sampled piano
s("steinway").note("c3 e3 g3 c4")

// World percussion
s("conga:5 conga:12 bongo:3 bongo:8").gain(0.7)

// Vietnamese zither with tremolo
s("dantranh_tremolo:8").note("c4 e4 g4")

// Mix sample types
s("timpani:5, sus_cymbal:10").note("c2")

Notes

note("c4 e4 g4")                 // Letter notation
n("0 2 4 7").scale("C:minor")    // Scale degrees
chord("<Cm7 Fm7>").voicing()     // Chords

Scales

Use n() with .scale() - any number will sound good in the scale.

Common scales:

  • C:major - happy, bright
  • A:minor - sad, emotional
  • D:dorian - jazzy, soulful
  • G:mixolydian - bluesy, groovy
  • A:minor:pentatonic - safe, universal
  • F:major:pentatonic - bright, easy

With octave: A2:minor (starts at A2)

Automate scales:

n("0 2 4 7").scale("<C:major D:mixolydian>/4")

Sampler Controls

.speed(2)         // Playback speed (negative = reverse)
.begin(0.25)      // Start point (0-1)
.end(0.75)        // End point (0-1)
.clip(0.5)        // Duration multiplier
.cut(1)           // Cut group (stops others in same group)
.loopAt(4)        // Fit sample to n cycles
.fit()            // Fit sample to event duration

// Slicing
.chop(8)          // Chop into n pieces
.slice(8, "0 1 2 3 4 5 6 7")  // Slice and reorder
.splice(8, "0 1 2 3")         // Like slice, speed-adjusted

Envelopes

// Amplitude ADSR
.attack(0.1)      // Attack time (seconds)
.decay(0.2)       // Decay time
.sustain(0.5)     // Sustain level (0-1)
.release(0.3)     // Release time

// Filter envelope (add to lpf)
.lpenv(4)         // Envelope depth
.lpa(0.1)         // Filter attack
.lpd(0.2)         // Filter decay

// Pitch envelope
.penv(12)         // Pitch envelope depth (semitones)

Effects

// Filters
.lpf(800)         // Low-pass filter
.hpf(200)         // High-pass filter
.lpq(10)          // Resonance
.vowel("a e i o") // Vowel filter

// Space
.room(0.5)        // Reverb amount
.size(4)          // Reverb size
.delay(0.5)       // Delay amount
.delaytime(0.25)  // Delay time
.delayfb(0.5)     // Delay feedback

// Dynamics
.gain(0.8)        // Volume
.pan(0.5)         // Stereo position
.distort(0.2)     // Distortion
.shape(0.3)       // Waveshaping
.crush(4)         // Bit crush

Signals (Continuous Patterns)

// Waveforms (0-1)
sine              // Smooth oscillation
saw               // Ramp up
tri               // Triangle
square            // Square wave
cosine            // Cosine

// Random
rand              // Random 0-1
perlin            // Smooth random
irand(8)          // Random integer 0-7

// Modifiers
.range(200, 2000) // Scale to range
.slow(8)          // Slow the signal

// Example: filter sweep
.lpf(sine.range(200, 2000).slow(8))

Pattern Functions

// Time
.fast(2)          // Double speed
.slow(2)          // Half speed
.early(0.25)      // Shift earlier
.late(0.25)       // Shift later

// Structure
.rev()            // Reverse
.palindrome()     // Forward then backward
.iter(4)          // Shift start each cycle
.ply(2)           // Repeat each event

// Layering
.off(1/8, x=>x.add(7))    // Offset copy + transform
.layer(x=>x.add(7))       // Layer with transform
.superimpose(rev)         // Add reversed copy
.jux(rev)                 // Stereo: L=normal, R=reversed

// Conditional
.every(4, fast(2))        // Every nth cycle
.sometimes(rev)           // 50% chance
.often(fast(2))           // 75% chance
.rarely(rev)              // 25% chance
.struct("x ~ x ~")        // Apply rhythmic structure
.mask("1 0 1 1")          // Silence where 0

// Randomness
.degrade()                // Remove 50% randomly
.degradeBy(0.3)           // Remove 30% randomly
choose("bd", "sd", "cp")  // Pick one randomly

Tempo & Duration

setcpm(130/4)     // 130 BPM (4/4 time)
setcpm(180/3)     // 180 BPM waltz (3/4 time)
setcps(0.5)       // 0.5 cycles per second (= 120 BPM)

Duration Math

cps = BPM / 60 / 4
cycles = minutes × 60 × cps
Duration90 BPM110 BPM120 BPM128 BPM140 BPM160 BPM174 BPM
cps0.3750.4580.50.5330.5830.6670.725
2 min45556064708087
5 min112137150160175200217
10 min225275300320350400435

Sum your arrange() entries to hit the target.


Chord Voicing & Progressions

// Define a progression (angle brackets = one chord per cycle)
let prog = "<Cm7 Fm7 Abmaj7 G7>"

// Basic chord with voicing
chord(prog).voicing().s("piano")

// .anchor() sets the root octave for voicings
chord(prog).anchor("C3").voicing()     // Bass register
chord(prog).anchor("C5").voicing()     // High register

// Dynamic anchors (changes over time)
chord(prog).anchor("<C3@8 C4@4>").voicing()

// .ply(n) repeats each chord n times per cycle
// Great for waltz (3) or house (4) feels
chord(prog).ply(3).gain("0.8 0.3 0.4")  // Waltz: strong-weak-weak
chord(prog).ply(4).gain("1 0.5 0.7 0.5") // House groove

// .arp() arpeggiate through chord tones by index
chord(prog).voicing().arp("0 1 2 3")     // Root, 2nd, 3rd, 4th
chord(prog).voicing().arp("0 2 4 7")     // Wider intervals
chord(prog).ply(6).voicing().arp("0 1 2 3 5 7").rev()  // Descending

// Add octave jumps to arpeggios
chord(prog).voicing().arp("0 1 2 3".add("[12 |0|0]*4"))

// Extract just the root for bass
chord(prog).anchor("C2").voicing().arp("0")

Sidechain Ducking

// Make elements duck (lower volume) when another orbit plays
.duckorbit(1)      // Duck when orbit 1 plays
.duckdepth(0.3)    // How much to duck (0-1)

// Classic house sidechain: chords pump with kick
let kick = s("bd").orbit(1)
let chords = chord("<Cm7 Fm7>").voicing()
  .duckorbit(1).duckdepth(0.4)
  .s("piano")

stack(kick, chords)

Timeline Arrangements

When user asks to "arrange", "create a track", "make a song", or specifies a duration → use arrange().

arrange(
  [4, intro],
  [8, build],
  [8, drop],
  [4, outro],
)

See /arrange skill for full reference with duration math and genre examples.


Probabilistic Variations

// .sometimesBy(probability, transform)
.sometimesBy(0.3, x => x.crush(4))   // 30% chance bitcrush
.sometimesBy(0.5, x => x.rev())      // 50% chance reverse

// Create variation helper functions
const degrade = (x, freq = 0.5) => x
  .sometimesBy(freq, x => x.clip("0.5|0.75"))
  .sometimesBy(freq, x => x.ply("2|3"))

// Use in arrangements
arrange(
  [8, degrade(arpeggio)],
  [8, degrade(arpeggio, 0.25)],  // Less degradation
)

Transposition

.trans(12)    // Up one octave (12 semitones)
.trans(-5)    // Down a fourth
.trans(3)     // Up a minor third (key change!)

// Dramatic ending: transpose up
arrange(
  [8, melody],
  [8, melody.trans(3)],  // Key change!
  [4, melody.trans(3).room(1)],
)

Genre → Instrument Guide

GenreDrumsBassKeys/PadsLead/Melody
Housetr909sawtoothgm_pad_warm, gm_epiano1supersaw
Technotr808, tr909sawtooth, squaregm_pad_metallicgm_lead_2_sawtooth
Jazztr707 (brushes)gm_acoustic_bassgm_epiano1, pianogm_tenor_sax, gm_trumpet
Ambientminimal/nonegm_contrabassgm_pad_warm, gm_pad_halokalimba, gm_flute
Metaltr909 (fast)gm_distortion_guitargm_overdriven_guitargm_guitar_harmonics
Synthwavetr808sawtooth, gm_synth_bass_1gm_pad_warmsupersaw, gm_lead_2_sawtooth
Lo-fivinyl drumsgm_acoustic_bassgm_epiano1, pianogm_vibraphone, kalimba
Orchestralgm_timpanigm_contrabass, gm_bassoongm_string_ensemble_1gm_violin, gm_flute, gm_french_horn
Latincongas, bongosgm_acoustic_basspianogm_trumpet, gm_alto_sax
Funktr808gm_slap_bass_1gm_clavinet, gm_epiano1gm_trumpet, gm_tenor_sax

Method Syntax (IMPORTANT)

All methods need parentheses. Even methods with no arguments.

// ✅ CORRECT
.rev()
.palindrome()
.degrade()

// ❌ WRONG - will cause errors
.rev
.palindrome
.degrade

Higher-Order Functions

Functions like jux, sometimes, every, off take a function as argument, not a method reference.

// ✅ CORRECT - arrow function
.jux(x => x.rev())
.sometimes(x => x.speed(-1))
.every(4, x => x.fast(2))
.off(0.125, x => x.add(7))

// ❌ WRONG - won't work
.jux(rev)
.sometimes(speed(-1))
.every(4, fast(2))

Chaining After Higher-Order Functions

Shortened here. Read the whole file on GitHub.

Signals

GitHub stars
63
Forks
7
Last commit
Feb 2026
Advanced
Catalog kind
skill
Gateway key
strudel
Source
github.com/renatoworks/strudel-claude