From tsal
Generates Strudel.cc code for live-coding musical patterns, drum sequences, melodies, basslines, and compositions. Provides browser-ready copy-paste code and base64-encoded shareable URLs.
npx claudepluginhub bfollington/terma --plugin tsalThis skill uses the workspace's default tool permissions.
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.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
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.
Use this skill when:
When a user requests a pattern, clarify:
For genre/artist-specific techniques, consult references/genre-styles.md which provides:
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:
"bd hh sd") for concise rhythm specificationstack() to layer multiple patterns.cpm() for tempo in cycles per minute(pulses, steps) for interesting distributions.off(1/8, x => x.add(7))The user always wants to run the code in their browser. Provide both:
scripts/strudel_url.py for immediate playbackWhen to encode URLs:
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.
After the user tests the pattern, they may request modifications:
.cpm(130) or .slow(2) or .fast(2).room(.5), .lpf(1000), .delay(.25).sometimes(x => x.speed(2)), .every(4, rev)Provide the updated code for copy-pasting. Skip URL encoding during iterations unless requested.
Use templates from assets/patterns/ as starting points:
Reference these when users request similar styles.
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% probabilityCommon 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 cyclesEffects:
.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:
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
Pattern not playing:
.s(), .sound(), or .note())Timing issues:
.cpm() or setcpm() to set tempo explicitly.fast() / .slow() callsFilter not working:
.lpa(), .lpd(), .lps(), .lpr()).lpenv() for filter envelope depthCode too complex:
let drums = s("bd hh")stack(drums, bass, melody)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.
Comprehensive technical reference including:
Load this file when users need detailed syntax explanations or advanced techniques.
Genre and artist style guide including:
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
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