
strudel
This skill should be used when working with Strudel.cc, a live-coding music environment. Use when creating musical patterns, drum sequences, melodies, basslines, or generative compositions. The user will always want to run Strudel code in the browser, either by copy-pasting or by providing a clickable URL with the code encoded in base64.
- Installs
- 142
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/bfollington/terma --skill strudel- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads strudel automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Strudel
Overview
Strudel is a browser-based live-coding environment that ports TidalCycles' pattern language to JavaScript. It uses pure functional programming to create musical patterns that can include drums, melodies, synthesis, and effects. Patterns are immutable query functions that transform time spans into event streams, supporting mini-notation DSL, Euclidean rhythms, and extensive audio processing.
When to Use This Skill
Use this skill when:
- Creating drum patterns, melodies, basslines, or full compositions
- Generating algorithmic or generative music
- Applying effects like filters, reverb, delay, or distortion
- Debugging Strudel code or explaining pattern behavior
- Encoding Strudel code into shareable URLs
Core Workflow
1. Understanding the User's Musical Intent
When a user requests a pattern, clarify:
- Genre/style (techno, ambient, jazz, etc.)
- Artist references (Lorn, Clams Casino, Aphex Twin, etc.)
- Tempo (BPM or cycles per minute)
- Elements needed (drums only, drums + bass, full arrangement)
- Complexity level (simple loop vs. generative/evolving)
For genre/artist-specific techniques, consult references/genre-styles.md which provides:
- Sonic characteristics for common genres and artists
- Strudel implementation patterns
- Concrete code examples for each style
- Typical tempo ranges, effects, and structural elements
2. Writing the Pattern
Build patterns using Strudel's functional, compositional approach:
Basic structure:
// Simple drum pattern
s("bd hh sd hh")
// With tempo
s("bd hh sd hh").cpm(120)
// Layered with stack
stack(
s("bd(3,8)"), // Kick drum
s("hh*8"), // Hi-hats
s("~ sd ~ sd") // Snare on backbeat
).cpm(120)
Key patterns:
- Use mini-notation (
"bd hh sd") for concise rhythm specification - Use
stack()to layer multiple patterns - Use
.cpm()for tempo in cycles per minute - Use Euclidean rhythms
(pulses, steps)for interesting distributions - Use lambda functions for transformations:
.off(1/8, x => x.add(7))
3. Providing Output to the User
The user always wants to run the code in their browser. Provide both:
- The raw code - for copy-pasting into https://strudel.cc/
- An encoded URL - using
scripts/strudel_url.pyfor immediate playback
When to encode URLs:
- Initial creation: Always provide encoded URL when creating a new pattern from scratch
- Iterations/refinements: Skip encoding unless user requests it
- Final version: Offer to encode when work is complete
Encoding a URL:
python3 scripts/strudel_url.py encode 's("bd hh sd hh").cpm(120)'
This produces a clickable link like:
https://strudel.cc/#cygiYmQgaGggc2QgaGgiKS5jcG0oMTIwKQ%3D%3D
Present the URL as a clickable link the user can immediately open.
4. Iteration and Refinement
After the user tests the pattern, they may request modifications:
- Adjust tempo:
.cpm(130)or.slow(2)or.fast(2) - Add effects:
.room(.5),.lpf(1000),.delay(.25) - Add variation:
.sometimes(x => x.speed(2)),.every(4, rev) - Change sounds: Replace sample names or add synthesis parameters
Provide the updated code for copy-pasting. Skip URL encoding during iterations unless requested.
Common Pattern Templates
Use templates from assets/patterns/ as starting points:
- techno-drums.js - 4/4 techno with Euclidean patterns
- acid-bass.js - TB-303 style bassline with filter sweeps
- ambient-pad.js - Lush pad with slow chord progression
- generative-melody.js - Algorithmic melody with scale and Euclidean rhythms
- breakbeat.js - Amen break slicing and manipulation
- polyrhythm.js - Multiple time signatures layered
Reference these when users request similar styles.
Key Syntax Quick Reference
Mini-notation:
"a b c"- Sequence (evenly distributed)"<a b c>"- Slow cat (one per cycle)"[a b]"- Subdivision (faster)"a,b,c"- Parallel/chord"a*4"- Speed up (4x)"a/2"- Slow down (2x)"a(3,8)"- Euclidean rhythm (3 pulses in 8 steps)"~"- Rest/silence"a?"- 50% probability
Common functions:
s()or.sound()- Sample selectionnote()or.note()- Pitch (note name or MIDI number).scale()- Apply scale (e.g.,"C:minor")stack()- Layer patterns.fast()/.slow()- Speed control.rev()- Reverse.sometimes()- Apply transformation 50% of the time.every(n, fn)- Apply transformation every n cycles
Effects:
.lpf()- Low-pass filter (cutoff frequency).hpf()- High-pass filter.room()- Reverb (0-1).delay()- Delay effect (0-1).gain()- Volume.pan()- Stereo position (0=left, 1=right)
For comprehensive syntax, consult references/strudel-reference.md which contains:
- Complete mini-notation syntax
- All pattern transformations (Euclidean, temporal, stochastic)
- Audio effects and synthesis parameters
- Signal functions (sine, perlin, saw, etc.)
- Pattern alignment strategies
- Practical composition examples
Search this file with grep when needed:
grep -i "euclidean" references/strudel-reference.md
grep -i "filter" references/strudel-reference.md
grep -i "delay" references/strudel-reference.md
Debugging Common Issues
Pattern not playing:
- Ensure the pattern ends with appropriate audio output (
.s(),.sound(), or.note()) - Check that samples are loaded (default samples work without loading)
- Verify syntax: balanced brackets, quotes, parentheses
Timing issues:
- Use
.cpm()orsetcpm()to set tempo explicitly - Check for conflicting
.fast()/.slow()calls - Verify Euclidean rhythms have valid (pulses, steps) values
Filter not working:
- Ensure cutoff frequency is in valid range (20-20000 Hz)
- Check filter envelope parameters (
.lpa(),.lpd(),.lps(),.lpr()) - Use
.lpenv()for filter envelope depth
Code too complex:
- Break into smaller patterns and test individually
- Use variables:
let drums = s("bd hh") - Stack tested patterns:
stack(drums, bass, melody)
Resources
scripts/strudel_url.py
Python script for encoding/decoding Strudel URLs.
Encode:
python3 scripts/strudel_url.py encode '<strudel-code>'
Decode:
python3 scripts/strudel_url.py decode '<strudel-url>'
Always encode URLs after creating or modifying patterns to provide clickable links.
references/strudel-reference.md
Comprehensive technical reference including:
- Complete mini-notation syntax
- All pattern operations and transformations
- Audio effects and synthesis
- Signals and continuous patterns
- Composition examples
- Best practices
Load this file when users need detailed syntax explanations or advanced techniques.
references/genre-styles.md
Genre and artist style guide including:
- Dark Ambient Hip-Hop (Lorn, Clams Casino)
- Techno (General, Dub Techno)
- Drum & Bass / Jungle (Jungle, Liquid DnB)
- Trap / Hip-Hop (Trap, Boom Bap)
- Ambient / Experimental (Dark Ambient, IDM/Glitch)
- House (Deep House, Acid House)
Each entry provides sonic characteristics and Strudel implementation techniques. Load when users reference specific genres or artists.
Search this file when needed:
grep -i "lorn" references/genre-styles.md
grep -i "techno" references/genre-styles.md
grep -i "ambient" references/genre-styles.md
assets/patterns/
Example pattern templates for common musical styles. Copy and adapt these as starting points:
techno-drums.js- Electronic drum patternsacid-bass.js- Resonant basslinesambient-pad.js- Atmospheric texturesgenerative-melody.js- Algorithmic melodiesbreakbeat.js- Sample manipulationpolyrhythm.js- Complex rhythmic structures
FAQ
What does the strudel skill do?
This skill should be used when working with Strudel.cc, a live-coding music environment. Use when creating musical patterns, drum sequences, melodies, basslines, or generative compositions. The user will always want to run Strudel code in the browser, either by copy-pasting or by providing a clickable URL with the code encoded in base64.
How do I install strudel?
Run npx skills add https://github.com/bfollington/terma --skill strudel in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/strudel/ (personal) or .claude/skills/strudel/ (project).
Which AI agents can use strudel?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is strudel safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains strudel?
It is published by bfollington in bfollington/terma. It has 142 recorded installs.
More from bfollington/terma
shadertoy
bfollington/terma
This skill should be used when working with Shadertoy shaders, GLSL fragment shaders, or creating procedural graphics for the web. Use when writing .glsl files, implementing visual effects, creating generative art, or working with WebGL shader code. This skill provides GLSL ES syntax reference, common shader patterns, and Shadertoy-specific conventions.
godot
bfollington/terma
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The godot command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
skill-improver
bfollington/terma
Use at a checkpoint after real friction — a task where something was repeatedly confusing, a skill misfired or failed to fire, or a workaround was invented that should not have been needed. Concerns turning friction into a change to the skills themselves, and knowing when the right change is to cut rather than add. Trigger at session end after substantial work, or when the same problem has now happened more than once. Do NOT use reflexively after routine tasks, or mid-task.
domain-driven-design
bfollington/terma
This skill should be used whenever domain modeling is taking place. It provides specialized guidance for type-driven and data-driven design based on Rich Hickey and Scott Wlaschin's principles. The skill helps contextualize current modeling within the existing domain model, identifies inconsistencies, builds ubiquitous language, and creates visualizations (Mermaid, Graphviz/DOT, ASCII diagrams) to communicate domain concepts clearly. Use this skill when designing types, modeling business domains, refactoring domain logic, or ensuring domain consistency across a codebase.
sqlite-db
bfollington/terma
General guide for using the sqlite3 CLI to build composable knowledge databases. Use this skill when creating SQLite databases, designing schemas, querying data, managing relationships, or building new sqlite-based domain skills. Provides the foundational patterns that all specialized sqlite skills build upon.
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image