Step 04 of 11
Sound and effects
Movement, effects and what their numbers mean, effects per instrument, several sounds in one layer, and a sound effect.
4.1Movement
Static loops get boring. Any number can be replaced with a pattern that changes over time. sine.range(300, 1800).slow(8) is a slow wave: the bass filter opens and closes once every 8 bars. .jux(rev) keeps the melody in the left ear and plays it reversed in the right ear, which makes it wider.
setcpm(124/4)
$: s("bd*4").bank("RolandTR909")
$: s("~ cp ~ cp").bank("RolandTR909")
$: s("[~ oh]*4").bank("RolandTR909").gain(.4)
$: s("hh*16").bank("RolandTR909")
.gain("[.25 .5]*8")
.sometimesBy(.2, x => x.ply(2))
$: note("<a1 f1 c2 g1>")
.struct("x ~ x x ~ x x ~")
.s("sawtooth")
.lpf(sine.range(300, 1800).slow(8))
.decay(.15).sustain(0)
$: chord("<Am7 F^7 C^7 G7>")
.struct("[~ x]*2")
.voicing()
.s("gm_epiano1")
.room(.5).gain(.6)
$: n("0 [~ 2] 4 [3 2]".add("<0 -2 2 -1>"))
.scale("A4:minor")
.s("triangle")
.jux(rev)
.delay(.4).gain(.5)
Listen for
The bass gets brighter and darker over 8 bars. The melody now fills both speakers.
Try changing
saw.range(…)instead ofsine.slow(2)for a faster sweep.jux(x => x.fast(2))
4.2Effects: reverb, delay, distortion and more
Effects change how a sound sounds after it's played: they add space (reverb), echoes (delay), grit (distortion), or take away brightness (filters). You add them with a dot: .room(.5). Effects can be patterns too, like any other value: .room("<0 .8>").
| Effect | Code | What it does · useful values |
|---|---|---|
| Reverb | .room(.5).roomsize(4) | Puts the sound in a room. room sets how much (0–1); roomsize sets how long the tail lasts, in seconds (0–10). |
| Delay (echo) | .delay(.5).delaytime(.36).delayfeedback(.5) | Repeats the sound. delay is how loud the echoes are, delaytime is the time between echoes in seconds, and feedback is how many echoes there are. Keep feedback below 0.9, or the echoes never stop. |
| Distortion | .distort("3:.5") | Overdrive and crunch: the amount (0–10+), then after a colon the output volume. Turn the volume down as the amount goes up. |
| Saturation | .shape(.4) | Softer warmth, 0–1. Above 0.7 it gets loud and harsh. |
| Bitcrusher | .crush(4) | Lo-fi, retro-game grit. 16 = clean, 1 = destroyed. |
| Downsampling | .coarse(8) | A cheap-sampler sound. 1 = clean, higher = rougher. |
| Low-pass filter | .lpf(800).lpq(10) | Removes highs, so it sounds darker and softer. Frequency in Hz (100–20000). Resonance adds a whistling peak (the acid sound). |
| High-pass filter | .hpf(300) | Removes lows, so it sounds thinner, like on a phone. Good for cleaning up mud. |
| Vowel filter | .vowel("a") | Makes a sound "talk": a e i o u |
| Phaser | .phaser(4) | A swirling, jet-plane sweep. The number is the speed. |
| Tremolo | .tremolo(8) | Volume pulsing. The number is pulses per second. |
| Pan | .pan(sine) | Left (0) to right (1). sine moves it back and forth. |
What the numbers mean (and which to pick)
Every effect number is one of four kinds. Once you know which kind you're looking at, you know which direction to turn it:
| Kind of number | Effects | How to read it |
|---|---|---|
| An amount, 0 – 1 like a volume knob | room delay delayfeedback shape gain pan tremolodepth | 0 = none, 1 = maximum, .5 = half. .room(.4) = 40 % reverb. |
| A frequency, in Hz | lpf hpf | Where the filter cuts. You hear from about 20 Hz (deep rumble) to 20000 Hz (the highest hiss). lpf removes what's above the number; hpf removes what's below it. |
| A time, in seconds | delaytime roomsize attack release | .delaytime(.47) = an echo every 0.47 s; .roomsize(6) = a reverb tail about 6 s long. |
| A strength or speed, on its own scale | distort crush coarse lpq phaser tremolo | Each has its own range; see the table below. Watch out: crush runs backwards (16 = clean, 1 = destroyed). |
Example: the guitar chain from "Chaining effects" below, .distort("4:.3").lpf(2200).room(.4). There are four numbers in it. Here is where each one sits on its scale:
distort("2:.5"); for a brighter one, lpf(4000); for a tighter, drier one, room(.15).Every effect: from gentle to extreme
| Effect | The number is… | No effect | Gentle | Medium | Strong | Start with |
|---|---|---|---|---|---|---|
.room(x) | how much reverb is mixed in (0–1) | 0 | .1–.2 | .3–.5 | .7–1 | .3 |
.roomsize(x) | length of the reverb tail in seconds (default 2) | – | .5–1 small room | 2–4 hall | 6–10 cathedral | 2 |
.delay(x) | how loud the echoes are (0–1) | 0 | .2 | .4 | .7+ | .4 |
.delaytime(x) | seconds between echoes | Match it to the beat: one beat = 60 ÷ BPM seconds. Then × ½ = eighth note, × ¾ = dotted eighth (the classic echo), × 1 = one beat. At 120 BPM: .25 · .375 · .5 | 60/BPM*.75 | |||
.delayfeedback(x) | how long the echoes go on (0–0.98) | 0 = 1 echo | .3 = 2–3 echoes | .5 = about 5 | .8+ = a long trail | .4 |
.lpf(x) | Hz: everything above is removed | 20000 | 5000–8000 | 1000–2500 | 200–500 (only bass left) | 2000 |
.hpf(x) | Hz: everything below is removed | 20 | 100–200 | 300–800 | 2000+ (a phone) | 200 |
.lpq(x) | resonance: a peak at the filter's frequency (0–50) | 0 | 2–5 | 8–15 | 20+ (whistles) | 5 |
.shape(x) | saturation (0–1) | 0 | .2 | .4–.6 | .8+ (very loud!) | .3 |
.distort("a:v") | a = amount (0–10), v = volume after it (0–1) | 0 | 1:.8 | 2–4:.5 | 6–10:.3 | "2:.5" |
.crush(x) | bits: lower = dirtier (16 → 1) | 16 | 8 | 4–6 | 1–3 | 6 |
.coarse(x) | roughness: higher = rougher (1 → 32) | 1 | 2–4 | 8 | 16–32 | 4 |
.phaser(x) | sweeps per second | – | .25–.5 slow swirl | 1–2 | 8+ fast wobble | .5 |
.tremolo(x) | volume pulses per second (depth: .tremolodepth(0–1)) | – | 2 | 4–8 | 16+ buzz | 4 |
.pan(x) | position: 0 left · .5 centre · 1 right | .5 | .4 / .6 | .25 / .75 | 0 / 1 | .5 |
.gain(x) | volume, 1 = normal | 0 = silent | .3 | .6–.8 | 1+ (may clip) | .8 |
- Change one number at a time, in big steps first (double it or halve it), then fine-tune.
- Frequencies work by doubling: 200 → 400 Hz sounds like as big a step as 4000 → 8000 Hz. Try 250, 500, 1000, 2000, 4000.
- Distortion and saturation make the sound louder, so lower the volume (the second number in
distort, or.gain) as you raise the amount. - Let the number change every bar to compare values side by side:
.lpf("<500 1000 2000 4000>").
Several numbers in one: the colon
Some effects take extra numbers after a colon. The order is fixed, so you need to know what each position means:
| Short form | Means the same as | Positions |
|---|---|---|
.distort("4:.3") | .distort(4).distortvol(.3) | amount : volume |
.lpf("2200:8") | .lpf(2200).lpq(8) | frequency : resonance |
.delay(".5:.375:.4") | .delay(.5).delaytime(.375).delayfeedback(.4) | echo volume : time : feedback |
Set the reverb size separately, .room(.4).roomsize(3). In this Strudel version a second number in room("…:…") doesn't reach the reverb.
Hear the scales
Each example below changes one number every bar (< >), from no effect to extreme. Watch the highlighted value in the editor while you listen.
setcpm(100/4)
// amount 0 (clean) → 1 → 2 → 4 → 8; the volume goes down as the amount goes up
note("[a2,e3,a3]").struct("x ~ x x ~ x ~ x").s("sawtooth")
.distort("<0:1 1:.8 2:.6 4:.4 8:.3>")
| Command | What it does |
|---|---|
note("[a2,e3,a3]").struct("x ~ x x ~ x ~ x") | A power chord (A, E, A) in a rock rhythm. |
.distort("<0:1 1:.8 2:.6 4:.4 8:.3>") | Five bars, one amount:volume pair each. Bar 1 is clean (0), bar 2 warm (1), bar 3 crunchy (2), bar 4 heavy (4, the value from the guitar example), bar 5 fuzz (8). The volume drops from 1 to .3 so every bar sounds about equally loud. |
setcpm(100/4)
// cut-off 20000 Hz (open) → 5000 → 2000 → 800 → 300 (only the bass left)
note("[a2,e3,a3]").struct("x ~ x x ~ x ~ x").s("sawtooth")
.lpf("<20000 5000 2000 800 300>")
| Command | What it does |
|---|---|
.lpf("<20000 5000 2000 800 300>") | Bar 1: nothing removed, bright and buzzy. Bar 2: slightly softer. Bar 3: warm (close to the 2200 of the guitar example). Bar 4: muffled, like music through a wall. Bar 5: only the low part is left. |
setcpm(100/4)
// room 0 (dry) → .2 → .4 → .7 → 1, in a 3-second hall
s("~ cp ~ [cp ~ ~ cp]").bank("RolandTR909")
.room("<0 .2 .4 .7 1>").roomsize(3)
| Command | What it does |
|---|---|
.room("<0 .2 .4 .7 1>") | Bar 1: dry. Bar 2: a touch of space. Bar 3: a clear room (.4, as in the guitar example). Bars 4–5: the reverb gets as loud as the clap itself, so the clap sounds far away. |
.roomsize(3) | The tail lasts about 3 seconds in every bar, so only the amount changes. |
Reverb
Reverb is the sound of a room: thousands of tiny echoes bounce off the walls and blend into a soft tail after each note. A little reverb makes a sound feel natural. A lot makes it sound far away.
setcpm(90/4)
// bar 1 dry · bar 2 small room · bar 3 big hall
s("~ cp ~ cp").bank("RolandTR909")
.room("<0 .3 .8>").roomsize("<1 2 8>")
| Command | What it does |
|---|---|
setcpm(90/4) | 90 BPM, slow enough to hear each tail die away. |
s("~ cp ~ cp").bank("RolandTR909") | A TR-909 clap on beats 2 and 4 (~ is a rest), with a gap after each clap where you hear the reverb. |
.room("<0 .3 .8>") | How much reverb is mixed in, a new value each bar (< >). The scale is 0–1: 0 = none (dry), .3 = a little, .8 = a lot. |
.roomsize("<1 2 8>") | How long the tail lasts, in seconds: 1 = a small room, 2 = a studio, 8 = a big hall. It changes together with room, so bar 3 is both loud and long. |
Delay
Delay is an echo: the sound repeats a moment later, and each repeat is quieter than the one before, like shouting in a canyon. When the echo time fits the tempo, the echoes become part of the rhythm.
setcpm(124/4)
// an echo every 0.36 s (a dotted eighth at 124 BPM), each echo a bit quieter
note("a4 ~ ~ ~ c5 ~ ~ ~").s("triangle")
.delay(.6).delaytime(.36).delayfeedback(.55)
| Command | What it does |
|---|---|
note("a4 ~ ~ ~ c5 ~ ~ ~") | Two notes per bar, A and C, each followed by three empty steps, so the echoes have room to sound. |
.s("triangle") | A soft, simple synth tone. |
.delay(.6) | How loud the echoes are, on a 0–1 scale: 0 = no echo, 1 = as loud as the note. .6 is clearly audible. |
.delaytime(.36) | The time between echoes, in seconds. 0.36 s is a dotted eighth note at 124 BPM (see below). |
.delayfeedback(.55) | How much of each echo comes back as the next echo. .55 gives about four or five echoes that you can hear. At .9 and above the echoes never die away. |
To fit echoes to the beat: one beat lasts 60 ÷ BPM seconds. At 124 BPM a beat is 0.48 s, an eighth note 0.24 s, and a dotted eighth (an eighth plus half of one, the classic U2/dub echo) 0.36 s.
Distortion
Distortion pushes a sound harder than it can take, so its smooth waves get flattened at the top and bottom and turn gritty: the overdrive of a rock guitar, the growl of an 808 bass. The more you add, the louder and rougher it gets.
setcpm(124/4)
// 808-style bass: bar 1 clean → bar 4 extreme (amount:volume)
note("a1*8").s("sine").decay(.2).sustain(0)
.distort("<0 2 5 10:.4>")
| Command | What it does |
|---|---|
note("a1*8").s("sine") | Eight low A notes per bar (a1 = 55 Hz, sub-bass) on a sine wave, the purest tone. A clean sine has no grit, so you hear exactly what the distortion adds. |
.decay(.2).sustain(0) | Each note fades out in 0.2 seconds: a short "boom". |
.distort("<0 2 5 10:.4>") | The distortion amount, one value per bar: 0 = clean, 2 = crunchy, 5 = heavy, 10 = extreme. In 10:.4 the number after the colon is the volume after the distortion (40 %), turned down because that much distortion is very loud. |
Bitcrusher and downsampling
A bitcrusher makes a sound lo-fi, like an old video game. Digital audio stores the sound as a long row of numbers, and the bit depth says how precise each number is (a CD uses 16 bits). .crush() lowers that precision, so the smooth wave turns into coarse steps with a fizzy, broken edge. Downsampling (.coarse()) is its cousin: it keeps fewer of those numbers per second, which sounds like a cheap 1980s sampler.
setcpm(124/4)
// bitcrusher on drums: 16 = clean, 2 = very dirty
$: s("bd*4, ~ sd").bank("RolandTR808").crush("<16 8 4 2>")
// downsampling on hi-hats: 1 = clean, 16 = very rough
$: s("hh*8").bank("RolandTR808").coarse("<1 4 8 16>").gain(.6)
| Command | What it does |
|---|---|
s("bd*4, ~ sd").bank("RolandTR808") | A TR-808 kick on every beat. The comma starts a second pattern at the same time: ~ sd is "rest, snare", so the snare lands halfway through the bar. |
.crush("<16 8 4 2>") | Bit depth, one value per bar, from 16 (clean) down to 1 (the lowest): 8 = slightly gritty, 4 = old video game, 2 = barely recognisable. Lower means dirtier. |
s("hh*8") | Eight closed hi-hats per bar. |
.coarse("<1 4 8 16>") | Keeps only every 1st, 4th, 8th or 16th number of the sound and repeats it: 1 = clean, 4 = a cheap sampler, 8 and 16 = metallic and rough. |
.gain(.6) | The hi-hats at 60 % volume, so they stay behind the drums. |
Saturation
Saturation is gentle distortion. It rounds off the loudest peaks of a sound, the way an old tape machine or a valve amplifier does when you push it a little. The sound gets warmer, fuller and louder without an obvious crunch. Use it on kicks and basses.
setcpm(124/4)
// the same kick and bass, saturation 0 → .3 → .6 → .8
$: s("bd*4").bank("RolandTR909").shape("<0 .3 .6 .8>").gain(.8)
$: note("<a1 f1 c2 g1>").struct("x ~ x x ~ x x ~").s("sawtooth")
.lpf(600).decay(.15).sustain(0)
.shape("<0 .3 .6 .8>").gain(.7)
| Command | What it does |
|---|---|
s("bd*4").bank("RolandTR909") | The four-on-the-floor kick from 2.1. |
note("<a1 f1 c2 g1>").struct("x ~ x x ~ x x ~") | The Night Bus bassline from 3.2, so you hear what saturation does to a bass you know. |
.lpf(600) | Removes everything above 600 Hz, so the bass stays dark. |
.shape("<0 .3 .6 .8>") | How hard the sound is pushed, one value per bar, on a 0–1 scale: 0 = clean, .3 = warm (a good starting point), .6 = thick, .8 = harsh. Above about .7 it starts to sound like distortion. |
.gain(.8), .gain(.7) | Each layer a little quieter, because saturation makes a sound louder. |
Filters
A filter removes part of the sound. A low-pass filter (.lpf) lets the low frequencies pass and cuts the highs, so the sound gets darker, like music heard through a wall. Moving a filter while the sound plays is one of the most used tricks in electronic music.
setcpm(124/4)
// low-pass sweep with strong resonance: a classic acid bassline
$: note("a1 a2 a1 [a2 c3] a1 g2 a1 e2").s("sawtooth")
.lpf(sine.range(300, 3000).slow(4)).lpq(12)
.decay(.15).sustain(0)
// the vowel filter makes chords "talk"
$: note("<[a3,c4,e4] [g3,b3,d4]>").struct("x*4").s("sawtooth")
.vowel("<a e i o>").gain(.5)
| Command | What it does |
|---|---|
note("a1 a2 a1 [a2 c3] a1 g2 a1 e2").s("sawtooth") | An eight-step bassline that jumps between low A (a1) and the A an octave higher (a2), on a bright sawtooth wave with plenty of highs for the filter to remove. |
.lpf(sine.range(300, 3000).slow(4)) | The cut-off frequency (where the filter starts cutting) glides between 300 Hz (dark) and 3000 Hz (bright) and back, once every 4 bars. |
.lpq(12) | Resonance: a boost right at the cut-off frequency, which gives the squelchy, whistling "acid" sound. 0 = none, 12 = strong, 20 and above = it whistles. |
.decay(.15).sustain(0) | Short, plucked notes that fade in 0.15 seconds. |
note("<[a3,c4,e4] [g3,b3,d4]>").struct("x*4") | Two chords, A minor then G major, one per bar, each played four times. |
.vowel("<a e i o>") | A filter that copies the shape of the mouth when you sing a vowel, one vowel per bar, so the chords seem to say "a", "e", "i", "o". |
.gain(.5) | The chords at half volume, behind the bass. |
Movement: phaser and tremolo
A phaser sweeps a hollow, swirling colour through the sound, like a jet plane passing overhead. Tremolo makes the volume pulse up and down, like the wobble of an old electric piano.
setcpm(100/4)
$: n(run(8)).scale("D4:minor pentatonic").s("sawtooth").release(.5)
.phaser("<1 2 4 8>")
$: note("<[d3,f3,a3] [c3,e3,g3]>").s("supersaw")
.tremolo("<2 8>").gain(.5)
| Command | What it does |
|---|---|
n(run(8)).scale("D4:minor pentatonic") | run(8) counts 0 to 7. As scale steps, that is eight notes going up the D minor pentatonic scale (a five-note scale), starting at D4. |
.release(.5) | Each note fades out over 0.5 seconds after it ends, so the notes overlap a little. |
.phaser("<1 2 4 8>") | The phaser's speed in sweeps per second, one value per bar: 1 = a slow swirl, 8 = a fast wobble. |
note("<[d3,f3,a3] [c3,e3,g3]>").s("supersaw") | Two chords, D minor then C major, one per bar, on supersaw: several sawtooth waves slightly out of tune with each other, a thick, wide synth. |
.tremolo("<2 8>") | Volume pulses per second: 2 = a slow throb, 8 = a fast shimmer. |
.gain(.5) | The chords at half volume. |
Which effects suit which instrument
Not every effect fits every sound. The main rule: low sounds stay dry and in the centre (reverb and delay smear the bass and make the mix muddy), and high, quiet or slow sounds can be wide and wet. Use the table as a starting point, then trust your ears.
| Instrument | Effects that suit it | Starting point in Strudel | Why | Avoid |
|---|---|---|---|---|
| Kick bd, sbd | saturation, light distortion | .shape(.3).distort("1.5:.7") | Adds punch and helps the kick cut through on small speakers. | reverb, delay, phaser: the kick loses its punch and the low end gets muddy |
| Snare / clap sd, cp, rim | short reverb, high-pass | .room(.3).roomsize(2).hpf(200) | A small room gives a tail and a sense of space without washing out the beat. | long delay with high feedback: the echoes fight the groove |
| Hi-hats / cymbals hh, oh, cr, rd | high-pass, panning, a little room | .hpf(400).pan(sine.range(.3,.7)).room(.15) | Remove the low rumble and spread them across the stereo field so they don't crowd the snare. | distortion and bitcrush: harsh and tiring (unless that's the style) |
| Sub bass / 808 sine, gm_synth_bass_1, 808 bd | low-pass, saturation | .lpf(300).shape(.4).distort("2:.5") | A clean sub is invisible on phone speakers; saturation adds harmonics you can hear. | reverb, delay, panning, phaser: bass must stay mono, dry and steady |
| Synth / acid bass sawtooth, square | resonant low-pass sweep, distortion | .lpf(sine.range(300,3000) .slow(4)).lpq(10).distort("2:.5") | The moving filter is the whole character of acid and techno basses. | big reverb: it blurs the rhythm of the line |
| Lead synth / melody sawtooth, supersaw, gm_lead_* | tempo delay, medium reverb | .delay(.4).delaytime(.36).room(.3).lpf(4000) | Echoes fill the gaps between phrases and keep the lead in front. | too much reverb: it pushes the lead to the back of the mix |
| Pad / strings / choir supersaw, gm_string_ensemble_1, gm_choir_aahs | big reverb, low-pass, slow movement | .room(.8).roomsize(6).lpf(2000).phaser(.5).attack(.5) | Pads are the "air" of the track: wide, soft and slowly moving. | distortion and crush: pads turn harsh and fill the whole mix |
| Piano / e-piano piano, gm_epiano1 | room, tremolo, phaser | .room(.3).tremolo(4) (e-piano wobble).lpf(2500) (lo-fi) | A real piano is in a room; tremolo is the classic electric-piano sound. | heavy distortion (unless you want a rock organ sound) |
| Pluck / arpeggio triangle, gm_harpsichord, gm_kalimba | tempo delay, panning, room | .delay(.5).delaytime(.24).delayfeedback(.4).pan(sine).room(.4) | Short notes leave gaps; echoes and stereo movement fill them. | long attack: the pluck loses its click |
| Guitar gm_electric_guitar_*, gm_overdriven_guitar | distortion + filter + reverb, phaser | .distort("3:.4").lpf(3000).room(.3).phaser(2) (clean) | Drive for the crunch, a low-pass to set how bright the sound goes into the drive (Strudel always filters before distorting), reverb for space. | bitcrush: guitars sound broken, not rocky |
| FX / noise / riser white, pink, gm_reverse_cymbal | filter sweeps, huge reverb, crush | .hpf(saw.range(200,8000) .slow(8)).room(.9).roomsize(8).crush(4) | Effects here are the whole sound: rising filters build tension. | nothing: go wild, but keep the volume under control |
Different reverbs per instrument need different orbits (see below).
setcpm(120/4)
// kick: saturation only, no reverb
$: s("bd*4").bank("RolandTR909").shape(.3)
// clap: a short room
$: s("~ cp ~ cp").bank("RolandTR909").room(.3).roomsize(2).orbit(2)
// hats: high-pass and gentle panning
$: s("hh*8").bank("RolandTR909").hpf(400).pan(sine.range(.3,.7)).gain(.6)
// bass: dry, filtered and saturated
$: note("<a1 a1 f1 g1>").struct("x*8").s("sawtooth").lpf(300).shape(.4).decay(.15).sustain(0)
// pad: big reverb, dark filter, slow attack, its own orbit
$: note("<[a3,c4,e4] [a3,c4,e4] [f3,a3,c4] [g3,b3,d4]>").s("supersaw")
.attack(.5).release(1).lpf(2000).room(.8).roomsize(6).gain(.35).orbit(3)
// pluck: tempo delay, panning
$: n("0 2 4 7 4 2 0 4").scale("A4:minor").s("triangle")
.delay(.5).delaytime(.375).delayfeedback(.4).pan(sine).gain(.5).orbit(4)
| Command | What it does |
|---|---|
s("bd*4")…shape(.3) | Kick: saturation adds punch. No .room, so it stays dry and tight. |
.room(.3).roomsize(2).orbit(2) | Clap: a small room for a short tail. .orbit(2) gives the clap its own reverb, separate from the pad. |
.hpf(400) | Hats: cuts everything below 400 Hz, so the hats don't add mud. |
.pan(sine.range(.3,.7)) | Hats: drift gently between left and right. |
note("<a1 a1 f1 g1>").struct("x*8") | Bass: one root per bar (A, A, F, G, the same roots as the pad chords), played as 8 short notes. |
.lpf(300).shape(.4) | Bass: the low-pass keeps only the deep part; .shape adds warmth you can hear on small speakers. No reverb, no pan. |
.attack(.5).release(1) | Pad: each chord fades in and out softly. |
.lpf(2000).room(.8).roomsize(6) | Pad: darker, then placed in a big hall. |
.orbit(3) | Pad: its own reverb, so the clap's small room and the pad's big hall don't mix. |
.delay(.5).delaytime(.375).delayfeedback(.4) | Pluck: an echo every 0.375 s, a dotted eighth at 120 BPM (one beat = 0.5 s × ¾). |
.pan(sine) on the pluck | Pluck: moves fully from left to right and back. |
Chaining effects
You can put as many effects on one sound as you like. But unlike a guitarist's pedalboard, the order you write them in doesn't matter: Strudel always runs them in the same fixed order. .room(.4).lpf(2200) sounds exactly like .lpf(2200).room(.4).
- sound
- lpf · hpf · vowel
- coarse
- crush
- shape
- distort
- tremolo
- pan
- phaser
- delay
- room
- speakers
This matters in the example below: .lpf(2200) darkens the sawtooth before it reaches the distortion, and the distortion then adds new bright overtones of its own. So here lpf sets how bright the sound is going into the distortion. If heavy distortion sounds too harsh, lower the distortion amount or the lpf frequency.
setcpm(110/4)
// a power-chord "guitar": distortion + filter + reverb
note("<[a2,e3,a3] [f2,c3,f3] [c3,g3,c4] [g2,d3,g3]>")
.struct("x ~ x x ~ x ~ x")
.s("sawtooth").distort("4:.3").lpf(2200).room(.4)
| Command | What it does |
|---|---|
note("<[a2,e3,a3] [f2,c3,f3] [c3,g3,c4] [g2,d3,g3]>") | Four power chords, one per bar: A5, F5, C5, G5 (root, fifth, octave). |
.struct("x ~ x x ~ x ~ x") | A rock strumming rhythm: 8 steps per bar, chords on the x steps. |
.s("sawtooth") | A bright, buzzy wave: a good raw material for distortion. |
.distort("4:.3") | 4 = the distortion amount, on a 0–10 scale: heavy (1 is warm, 2 crunchy, 8 fuzz). .3 = volume after the distortion, 30 %, because distortion makes the sound much louder. |
.lpf(2200) | 2200 = Hz. Everything above 2200 Hz is removed before the distortion, so the guitar sounds warm rather than fizzy. 20000 = no change, 800 = muffled. |
.room(.4) | .4 = 40 % reverb mixed in: a clear room around the guitar. 0 = dry, 1 = washed out. |
Where these values sit on their scales, with pictures: What the numbers mean.
Separate reverb and delay per layer: orbit
Reverb and delay are shared by every layer on the same orbit (a mixer channel). If one layer wants a huge hall and another wants a dry sound, put them on different orbits:
setcpm(124/4)
$: s("~ cp ~ cp").bank("RolandTR909").room(.9).roomsize(8).orbit(2) // big hall
$: s("bd*4").bank("RolandTR909") // stays dry
4.3Several sounds in one layer
One $: layer doesn't have to be one instrument. There are several ways to mix sounds inside it. Choose the one that matches what you want to hear.
| You want… | Code |
|---|---|
| A different sound on each step | s("bd [sd,cp] hh"), .s("piano sawtooth") |
| A different sound each bar | .s("<piano gm_marimba>") |
| Two instruments on the same notes (doubling) | .s("piano, gm_string_ensemble_1") |
| Doubling, each with its own settings | .layer(x => …, x => …) |
| The original plus a changed copy | .superimpose(x => …) |
| A delayed copy (call and answer) | .off(1/8, x => …) |
| Several whole patterns in one layer | stack(…, …, …) |
A different sound per step or per bar
setcpm(100/4)
// first half of the bar: piano, then marimba next bar (< >) · second half: sawtooth
note("c3 e3 g3 b3").s("<piano gm_marimba> sawtooth").lpf(2000)
Doubling: two instruments on the same notes
A comma inside s("…") plays both sounds on every note. Producers do this all the time: piano plus strings, or bass guitar plus synth bass.
setcpm(80/4)
note("<[c3,e3,g3] [a2,c3,e3]>").s("piano, gm_string_ensemble_1")
Each copy with its own settings: layer()
.layer() makes one copy per function. Each copy can have its own sound, octave, filter and volume.
setcpm(100/4)
note("c3 e3 g3 e3").layer(
x => x.s("piano"), // copy 1: piano as written
x => x.s("sawtooth").transpose(12).lpf(1500).gain(.3) // copy 2: soft synth an octave up
)
Original plus an extra copy: superimpose()
setcpm(100/4)
// the piano melody, plus a glockenspiel two octaves up
n("0 2 4 [6 4]").scale("C4:major").s("piano")
.superimpose(x => x.transpose(24).s("gm_glockenspiel").gain(.4))
Call and answer: off()
setcpm(100/4)
// vibraphone plays, pizzicato strings answer 1/8 of a bar later, an octave lower
n("0 2 4 7").scale("A4:minor").s("gm_vibraphone")
.off(1/8, x => x.s("gm_pizzicato_strings").transpose(-12))
Whole patterns in one layer: stack()
setcpm(124/4)
// drums, bass and chords together in a single $: layer
$: stack(
s("bd*4").bank("RolandTR909"),
note("<a1 f1 c2 g1>").s("sawtooth").lpf(600),
chord("<Am F C G>").voicing().s("gm_epiano1").struct("[~ x]*2")
)
4.4Using a sound effect: gm_gunshot
The General MIDI instruments (9.5) end with a group of sound effects: rain, a helicopter, applause, a gunshot. They play like any other gm_… instrument: write the name in s("…"). With no note they play at c3. Most have several recordings, and .n() picks one. gm_gunshot has 11, numbered 0 to 10. Some of them don't sound much like a gun, so listen through them first.
$: s("bd*4").bank("RolandTR909")
$: s("~ ~ ~ gm_gunshot").n("<0 1 2 3 4 5 6 7 8 9 10>").note("<c3 c2>")
.decay(.4).sustain(0).room(.4).gain(.8)
$: s("gm_gunshot*8").n(7).note("c4").gain(.4).mask("<0 0 0 1>")
| Command | What it does |
|---|---|
s("~ ~ ~ gm_gunshot") | Four steps per cycle: three rests (~), then one shot on beat 4. |
.n("<0 1 2 … 10>") | Picks the recording, a new one each cycle, so you hear all 11. Write down the numbers you like. n(11) is an empty slot and stays silent. |
.note("<c3 c2>") | Pitch. c3 is the default. c2 is an octave lower: a deeper, bigger boom. c4 is higher: a small pop. |
.decay(.4).sustain(0) | Fades the shot to silence in 0.4 seconds, which cuts off a long tail. |
.room(.4) | Adds reverb (the echo of a room), as if the shot were fired in a hall. |
.gain(.8) | A little quieter. The shot is loud next to drums. |
s("gm_gunshot*8").n(7) | Rapid fire: 8 shots per cycle, all with recording 7. |
.mask("<0 0 0 1>") | Silent for three cycles, plays on the fourth (0 = mute, 1 = play). |
Keep .bank() on the drum line only. s("bd*4, ~ ~ ~ gm_gunshot").bank("RolandTR909") looks for a sound called RolandTR909_gm_gunshot, finds nothing, and the shot stays silent ("not found" in the console).
Tested with Strudel 1.3. Course text: CC BY-SA 4.0, code: CC0 1.0 (licences).