← PROJECTS

STRUDELPOETICS.LIVE

A live-coded poetry environment — forking Strudel to perform live poetry

ROLE Developer & Language Designer
TIMELINE Ongoing · 2026
STACK Strudel · JavaScript · CodeMirror · Astro · Vercel
REPO Codeberg · Open Source Fork

OVERVIEW

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.

Strudel Poetics REPL in use

WHAT WE BUILT

Variable highlighting — identifier names light up wherever they appear inside stack and arrange expressions

Function call highlighting — arrangement functions (stack, arrange, cat) render in a distinct color

Custom CodeMirror extension — AST-level token detection via a new function-highlighter plugin

Transpiler patch — identifier location tracking injected into Strudel's core transpiler

Voice-to-Strudel — sing into the browser, quantize to a scale, name the variable, and the line drops straight into the editor

Pitch detection — Web Audio API autocorrelation with parabolic interpolation and energy-normalized confidence gating

Sound picker — searchable sample/synth browser with live audio preview, wired to Strudel's internal sound registry

Live at strudelpoetics.live with custom domain and Vercel deploy pipeline

APPROACH

The transpiler was patched to emit source location metadata for identifiers, which CodeMirror then uses to apply decorations in real time. The voice feature borrows the browser's AudioContext singleton to avoid conflicts with the running audio engine, runs autocorrelation pitch detection with parabolic interpolation on every animation frame, and quantizes detected pitches to a user-selected scale before writing the result into the editor.

Variable highlighting in editor

Sing a phrase into the browser. Detected pitches are quantized to a scale and dropped straight into the editor as a named pattern.

Naming the variable and injecting into editor

Name the variable, pick a sound, and the pattern injects directly into the top of the editor.

OPEN REPL → VIEW CODE →