Files
Strudel-AI-music/agentic_workflow/SKILL.md
2026-03-20 21:16:20 +01:00

3.7 KiB

name, description
name description
strudel-music Generate professional music using Strudel (strudel.cc), a browser-based live coding environment. Use this skill whenever the user asks to create music, beats, loops, songs, melodies, basslines, drum patterns, or anything related to algorithmic music composition. Also trigger when the user mentions Strudel, TidalCycles, live coding music, beat making with code, generative music, or asks for patterns in mini-notation. This skill covers music theory, Strudel syntax, genre-specific production techniques, and full song composition. Use it even if the user just says "make me a beat" or "create a song" — Strudel code is the output format.

Strudel Music Production Skill

Generate professional-quality music as Strudel code for playback at https://strudel.cc

Quick Start

All output is valid Strudel code the user pastes into the REPL at strudel.cc and runs with Ctrl+Enter.

Before Writing Any Code

  1. Read references/strudel-syntax.md — complete language reference
  2. Read references/music-theory.md — scales, chords, progressions, rhythm theory
  3. Read references/genre-recipes.md — genre-specific templates and techniques
  4. Read references/production-tips.md — mixing, arrangement, professional polish

Core Workflow

Step 1: Understand the Request

  • What genre/mood/style? (trap, techno, ambient, pop, dnb, house, lo-fi, etc.)
  • What tempo range? (see genre-recipes.md for defaults)
  • Simple loop or full arrangement?
  • Any reference artists? (use their style as guide)

Step 2: Choose Musical Foundation

  • Pick key and scale (see music-theory.md)
  • Pick chord progression (see music-theory.md for common progressions per genre)
  • Set tempo with setcps(BPM/60/4) or setcpm(BPM/4)

Step 3: Build Layers (always use $: for multiple patterns)

Build in this order:

  1. Drums — kick, snare/clap, hi-hats, percussion
  2. Bass — sub bass or melodic bass
  3. Chords/Pads — harmonic foundation
  4. Melody/Lead — top-line or arpeggios
  5. FX/Texture — atmosphere, risers, noise

Step 4: Apply Effects & Polish

  • Filter automation with signals (sine, saw, etc.)
  • Reverb (room/size) and delay for space
  • Gain dynamics for groove
  • Pan for stereo width
  • Pattern effects (rev, jux, off, every) for variation

Step 5: Validate Output

  • All code must be syntactically valid Strudel
  • Must use $: prefix for each parallel pattern
  • Tempo must be set explicitly
  • No undefined functions or unsupported syntax

Output Format

// [Genre] — [Key] — [BPM] bpm
setcps(BPM/60/4)

$: // drums
...

$: // bass
...

$: // chords
...

$: // melody
...

Always include a comment header with genre, key, and BPM.

Critical Syntax Rules

  1. Use $: before EACH pattern when playing multiple simultaneously
  2. setcps(BPM/60/4) at the top — this converts BPM to cycles per second
  3. Mini-notation goes inside quotes: note("c3 e3 g3")
  4. Chain effects with dots: .sound("piano").lpf(800).room(0.5)
  5. Parallel within one pattern: comma , — e.g. s("bd sd, hh*8")
  6. Rest = ~ or -
  7. Subsequence = [a b], alternate per cycle = <a b>
  8. Speed up = *N, slow down = /N
  9. Elongate = @N, replicate = !N
  10. Scale degrees with n() + .scale(), raw notes with note()

Common Pitfalls to Avoid

  • Do NOT use stack() AND $: together — use one or the other
  • Do NOT forget .sound() when using note() — default is triangle
  • Do NOT set lpf too low on sub bass — it will disappear
  • Do NOT use setbpm() — it does not exist. Use setcps() or setcpm()
  • Do NOT quote signal names: .lpf(sine.range(200,2000)) not .lpf("sine")
  • Do NOT put $: inside stack() — it's a top-level declaration only