Synth — live coded

Inspired by Sonic Pi, Overtone, and TidalCycles — live-coded music as a first-class way to explore sound.

A polyphonic subtractive synth whose patch parameters and control panel UI are both authored in Clojure. The DSP graph (oscillator → filter → gain → output) is a fixed Web Audio graph in the browser; an animation-frame loop polls the cljrs-side (patch) vector and pushes any changes onto the audio nodes. The control panel below is rendered by cljrs.ui — the editor source contains the entire hiccup tree, so the same code that draws the sliders also runs at build time to produce SEO-visible HTML.

Hold Alt (or Ctrl) and drag any number to scrub it live. Editing the source re-evals it; def'd atoms reset to source values, so source = preset / sliders = live tweak.

Keyboard: press Start first, then play with a s d f g h j k (white keys, C major) and w e t y u (black keys). Hold multiple keys for chords — up to 8 voices ring simultaneously. Each voice has its own ADSR.

silent

preset

preset

patch

0.0
7.0

filter

900.0
6.0
0.0
0.25

envelope

0.02
0.15
0.6
0.35

LFO → cutoff

4.0
300.0

amp

0.5

sends

0.9
0.15
0.15
2.0
0.375
0.4

Patch values stream into Web Audio every frame. Pick a preset to snap all knobs, then edit sliders for a live tweak.

What's happening