Strudel 101: Drums and Beats
Anatomy of a function call
- A function call has three parts: a name, parentheses, and something inside the parentheses.
- What’s inside the parentheses (in quotes) tells the function what to do.
These are all the drum sounds you can use in strudel:

- bd = bass drum
- sd = snare drum
- rim = rimshot
- hh = hihat
- oh = open hihat
- lt = low tom
- mt = middle tom
- ht = high tom
- rd = ride cymbal
- cr = crash cymbal
Try it: Change the letters inside the quotes and run the pattern again. Notice the sound changes, but the shape of the line never does.
Spoiler
The words inside the quotes are what you hear
- Everything inside the quotes is Strudel’s own pattern language (“mini-notation”). It is not JavaScript.
A few symbols worth knowing:
- ~ (rest/silence)
- * (repeat, e.g.
hh*4) - < > (make each element take a full cycle, e.g.
"<bd sd>"). - [ ] (Group into the same cycle, e.g.
["bd sd"]).
Try it: Add a ~ somewhere in the string. Add a *2 or *4 after a sound. Listen for what each symbol does.
Spoiler
Numbers vs. strings
- Quoted values (in
" ") are strings, strudel will attempt to run them as a pattern. - Unquoted values are plain numbers. Used for things like speed, volume or other effects.
- A very common typo: forgetting a closing quote, or quoting a number that shouldn’t be quoted.
.fast(2) // number, no quotes
.s("bd") // string, needs quotes
Chaining functions with more functions
- A dot means: “take what’s to my left, and do this to it.”
- You can chain as many dots as you want, each one transforms the result of everything before it.
Try it: Add .slow(2) or .pan(0.5) to the end of a line. Then try reordering two chained calls. Does it still work? Does it sound different?
Spoiler
Other interesting functions:
.jux()creates a strange stereo effect.rev()reverses the order of the notes playing.distort(1)adds distortion.lpf(200)low pass filter.hpf(200)high pass filter
Layering mulitple instruments
- New layers can be created by adding a
$:at the start of the line, this will make it unique - You can also name those layers by adding a word before the colon, e.g:
hihats:
Try it: Create a layer for claps.
Spoiler
Setting the BPM
Place this at the top of your strudel code:
setcpm(140/4)
This will set the BPM to 140 in 4/4
Try it: Set the BPM to 90 or 500.
Spoiler
Note: If you have multiple setcpm() statements, only the latest will apply.
Muting layers live
//turns the rest of a line into a comment, strudel ignores it completely.- this is how live coders mute a layer without deleting it: comment it out, then uncomment it later.
- You can also use the shortcut Ctrl + / on windows/linux or ⌘ Cmd + / on mac to comment out lines quickly
Try it: Comment out one line in and run it. Then uncomment it.
Spoiler
Putting it together
- Chain at least two dot-methods onto a line (try
.fast,.slow,.gain,.pan,.room). Try using the reference tab to figure out what these take as function input. - Comment one line out, then back in, without breaking anything.
- Use .gain() to make exactly one layer noticeably louder than the rest.
- Add an “anvil” sound to your layer.
- Use the .bank() function to change the drum sounds.
- Use <> inside one string so a sound alternates between two different hits each cycle.