STRUDELPOETICS.LIVE
A live-coded poetry environment โ forking Strudel to perform live poetry
OBJECTIVE
Strudel Poetics is a fork of Strudel โ the browser-based live coding environment for music โ adapted for writing and performing live poetry. The REPL is extended with custom syntax highlighting and a voice-to-code interface: variables glow wherever they appear in a pattern, and you can hum or sing a melody directly into the editor. Code as composition. Performance as text.
APPROACH
What happens when you treat a poem the same way a musician treats a loop? Each feature addresses one gap: variable highlighting โ built on a custom CodeMirror extension โ makes structure visible; the voice interface uses the Web Audio API and the browser's AudioContext for pitch detection and quantization, making composition feel like dictation, not programming.
Sing a phrase into the browser. Detected pitches are quantized to a scale and dropped straight into the editor as a named pattern.
Name the variable, pick a sound, and the pattern injects directly into the top of the editor.
BUILT
Variable & function highlighting โ identifier names glow wherever they appear in a pattern; arrangement functions render in a distinct color, making the structure of a composition readable at a glance
Voice-to-Strudel โ sing into the browser, quantize to a scale, name the variable, and the line drops straight into the editor as a playable pattern
Sound picker โ searchable sample and synth browser with live audio preview, wired directly to Strudel's internal sound registry
Custom CodeMirror extension + transpiler patch โ AST-level token detection and identifier location tracking make the highlighting system possible without touching the editor's core rendering
IMPACT / REFLECTIONS
The sing-to-code feature shipped end-to-end โ you can hum a melody into the browser and it lands in the editor as a named pattern.
The pitch detection is sensitive to room noise. Raw mic access helps but it's still fragile in loud environments โ a calibration step is the fix I'd prioritize first.
Next up: resolving a known cursor glitch around inline canvas widgets, improving pitch detection in noisy environments, and exploring mobile-first performance improvements. View the full roadmap โ