Compose, render, and play music using Strudel live-coding patterns. Usage: /strudel <prompt> — describe what you want to hear (mood, scene, genre, instruments). /strudel play <name> — play a saved composition in Discord VC. /strudel samples — manage sample packs. /strudel list — show available compositions. Like /imagine for Midjourney, but for music.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Compose, render, and play music using Strudel live-coding patterns. Usage: /strudel <prompt> — describe what you want to hear (mood, scene, genre, instruments). /strudel play <name> — play a saved composition in Discord VC. /strudel samples — manage sample packs. /strudel list — show available compositions. Like /imagine for Midjourney, but for music.
user-invocable
true
metadata
{"openclaw":{"emoji":"🎵","requires":{"bins":["node"],"anyBins":["ffmpeg"],"env":["DISCORD_BOT_TOKEN"],"node":">=18","description":"Offline rendering requires Node.js 18+. ffmpeg needed for MP3/Opus conversion. DISCORD_BOT_TOKEN only required for VC streaming — compose/render works without it."},"primaryEnv":"DISCORD_BOT_TOKEN","install":[{"id":"setup","kind":"script","script":"npm install && bash scripts/download-samples.sh","label":"Install dependencies + download drum samples (~11MB from github.com/tidalcycles/Dirt-Samples, CC-licensed)"},{"id":"ffmpeg","kind":"apt","package":"ffmpeg","bins":["ffmpeg"],"label":"Install ffmpeg (audio format conversion)"}],"securityNotes":"PATTERN EXECUTION: Strudel compositions are JavaScript evaluated in Node.js. Patterns CAN access the filesystem, environment variables, and network. Only run compositions you trust. For untrusted patterns, run in a sandbox (container/VM) with no credentials mounted. SAMPLE DOWNLOADS: Default samples fetched from github.com/tidalcycles/Dirt-Samples (CC-licensed). The 'samples add <url>' command enforces a configurable size limit (STRUDEL_MAX_DOWNLOAD_MB, default 10240/10GB), MIME type validation on downloaded archives, and an optional host allowlist (STRUDEL_ALLOWED_HOSTS, comma-separated). Only add packs from trusted sources. CREDENTIALS: DISCORD_BOT_TOKEN is only needed for VC streaming. Compose/render/list work with zero credentials. If providing a token, use minimal scopes (Connect, Speak, Send Messages). RENDERING: All audio synthesis is local and offline via node-web-audio-api (Rust/C++ Web Audio for Node.js). No browser, no puppeteer, no remote code execution. Legacy browser renderer scripts exist in repo but are marked DEPRECATED and not invoked by the skill. RECOMMENDED: Run this skill in an OpenClaw sandbox when accepting user-submitted patterns."}}
Strudel Music 🎵
Like /imagine for Midjourney, but for music. Compose, render, and stream music using Strudel live-coding patterns — entirely offline, no browser required.
Command Interface
When a user invokes /strudel, route based on intent:
/strudel <prompt> — Compose from description
Generate a Strudel pattern from a natural language prompt. The agent interprets the mood, instruments, tempo, and structure, writes a composition file, renders it to audio, and posts the result.
Examples:
/strudel dark ambient tension, low drones, sparse percussion, 65bpm
/strudel upbeat tavern music with fiddle and drums
/strudel lo-fi chill beats to study to
/strudel epic battle music, brass and timpani, 140bpm
/strudel a theme for a character named Cael — curious, quick, a little dangerous
Workflow:
Parse prompt → select mood, key, tempo, instruments from the decision tree
Write a .js composition file using Strudel pattern syntax
Render via node src/runtime/offline-render-v2.mjs <file> <output.wav> <cycles> <bpm>
/strudel samples add <url> — download a sample pack from a URL (ZIP/tar containing WAV directories)
/strudel samples add <path> — symlink or copy a local directory into samples/
How custom samples work:
Drop any directory of WAV files into samples/<name>/. They're automatically discovered by the renderer. Use them in patterns with s("<name>"). Variations are indexed by filename sort order — access with s("<name>").n(3).
Example: if you have an Ableton drum rack exported as WAVs:
Your own packs: Export from any DAW (Ableton, FL Studio, M8 tracker, etc.) as WAV directories. Strudel doesn't care where they came from — it's just WAV files in folders.
Named banks (Strudel built-in, requires CDN access):
Then wsl --shutdown and relaunch. Without this, WSL2's NAT breaks Discord's UDP voice protocol — the bot joins the channel but no audio flows because IP discovery packets can't traverse the NAT return path. Mirrored mode eliminates the NAT by putting WSL2 directly on the host's network stack.
This only affects VC streaming. Offline rendering and file posting work in any networking mode.
How It Works
The offline renderer uses node-web-audio-api (Rust-based Web Audio for Node.js) for real audio synthesis:
Note on mini notation: The renderer explicitly calls setStringParser(mini.mini) after import because Strudel's npm dist bundles duplicate the Pattern class across modules. Same class of bug as openclaw#22790.
let intro = stack(pad, noise)
let verse = stack(drums, bass, melody)
let chorus = stack(drums, bass, melody, lead)
arrange(
[8, intro],
[16, verse],
[8, chorus]
).cpm(120/4)
Mood→Parameter decision tree
Mood
Tempo
Key/Scale
Character
tension
60-80
minor/phrygian
Low cutoff, sparse, drones
combat
120-160
minor
Heavy drums, fast, distorted
exploration
80-100
dorian/mixolydian
Open, delay, mid energy
peace
60-80
pentatonic/major
Warm, slow, ambient
mystery
70-90
whole tone
Reverb, sparse, unpredictable
victory
110-130
major
Bright, fanfare, full
sorrow
48-65
minor
Sustained pads, minimal
ritual
45-60
dorian
Organ drones, chant
See references/mood-parameters.md for the full tree with transitions and leitmotifs.
See references/production-techniques.md for advanced techniques (breathing, shimmer, earth pressure).