Create playablestrudel code

Generate Strudel code snippets for live-coding music

Examples
Techno Bass Fugue

Generate a techno bass fugue built from electric bass samples in a minor scale. Create a repeating but evolving bass motif using nested rhythmic groupings and polymetric subdivisions.

strudel
"<8(3,8) <7 7*2> [4 5@3] 8>".sub(1)
.layer(
  x=>x,
  x=>x.add(7)
  .off(1/8,x=>x.add("2,4"))
  .slow(2),
).n().scale('A1 minor')
.s("flbass").n(0)
.cutoff(sine.slow(7).range(200,4000))
.resonance(10).clip(1)
.stack(s("bd:1*2,~ sd:0,[~ hh:0]*2"))
Blippy Rhodes Jazz-Techno

Generate a playful, blippy Rhodes-led groove with a jazzy–electronic feel. Use a bright electric piano playing short, syncopated motifs that loop and mutate.

strudel
stack(
  s("<bd sn> <hh hh*2 hh*3>"),
  "<g4 c5 a4 [ab4 <eb5 f5>]>"
  .scale("<C:major C:mixolydian F:lydian>")
  .struct("x*8")
  .scaleTranspose("0 [-5,-2] -7 [-9,-2]")
  .slow(2).note().clip(.3)
  .s('rhodes').room(.5)
  .delay(.3).delayfeedback(.4),
).fast(3/2)
Minimal Piano

Generate a minimal, melodic piano pattern in a minor key with a hypnotic, generative feel. Build a short motif from simple scale degrees with subtle polyrhythms.

strudel
n("<0 2 [4 6](3,4,2) 3*2>")
.off(1/4, x=>x.add(n(2)))
.off(1/2, x=>x.add(n(6)))
.scale('D minor')
.echo(4, 1/8, .5)
.clip(.5)
.piano()
.pianoroll()
Club-Jazz Csound Groove

Generate a live-coded jazz–electronic groove built around rich seventh chords and a steady rhythmic pulse with evolving timbral movement.

strudel
stack(
  chord("<C^7 A7 Dm7 Fm7>/2")
  .dict('lefthand').voicing()
  .cutoff(sine.range(500,2000).slow(16))
  .euclidLegato(3,8).csound('FM1'),
  note("<C2 A1 D2 F2>/2")
  .ply(8).csound('Bass'),
  s("bd*2,[~ hh]*2,~ cp")
  .bank('RolandTR909')
)
Minimal Polyrhythmic Drums

Generate a minimal drum-machine groove built from kick, snare, and closed hi-hat only. Use uneven rhythmic groupings and rotated accents.

strudel
stack(
  "<bd!3 bd(3,4,3)>",
  "hh*4",
  "~ <sn!3 sn(3,4,2)>"
).s()
.pianoroll({fold:1})
Chiptune Platformer Theme

Generate a chiptune-style platformer theme inspired by classic 8-bit game music. Write a bright, catchy lead melody that feels playful and heroic.

strudel
stack(
  note(`<
  [e5 ~] [[d5@2 c5] [~@2 e5]] ~
  [~ [c5@2 d5]] [e5 e5] [d5 c5]
  [e5 f5] [g5 a5]
  >`).clip(.95),
  note(`<
  [~ g4]!2 [~ ab4]!2
  [~ a4]!2 [~ bb4]!2
  >`),
  note("<c3!7 a3 f3!2 e3!2>")
  .clip(.5)
).fast(2)