Eurorack modular synth with dangling patch cables

I wanted to know if one 2D canvas could draw three HTML form panels as Eurorack synthesiser modules, drape physical Verlet-simulated patch cables in front of them with cast shadows and a live oscilloscope, and still leave every slider, select and jack clickable and keyboard-accessible. Drag from one 3.5 mm jack to another (or tap two jacks in turn) to rewire the patch, and press Power inside the VCF module to start Web Audio.

VCO-1OSC
VCO OUT
LFO-1MOD
LFO OUT
VCF / MIXOUT
AUDIO IN CV IN

Patched: VCO OUT to AUDIO IN, LFO OUT to CV IN. Sound is muted until you press Power.

Show the code three drawable fieldsets, Verlet cables and oscilloscope
  1. The rack markup. Three drawable <fieldset> modules sit inside one layoutsubtree canvas. Every slider, select and jack button stays a standard HTML control.
  2. Faceplate styling. CSS lays out the labels, sliders, recessed scope slot and 3.5 mm jack buttons inside each module.
  3. Responsive rack slots and five-argument draws. On wide screens the three modules sit side by side; below 660 px they stack into a two-row skiff under 4 megapixels at 2.625 scale. Each module is drawn with a five-argument drawElementImage().
  4. Verlet patch cables drawn in front of the DOM. Each cable has 12 nodes with gravity, damping and distance constraints. Cast shadows, braided jackets and metallic plugs paint after drawElementImage() so they hang visually over the controls without blocking hits.
  5. Live oscilloscope and Web Audio patch graph. Pressing Power creates and resumes an AudioContext routed through an AnalyserNode. While muted, a synthetic preview trace reflects the active patch immediately on load.
  6. Pointer drag and tap/keyboard patching. Dragging from one jack to another pulls a live dangling cable; tapping or pressing Enter on two jacks toggles the same connection without needing hover or drag.

How it works

The idea comes from hardware Eurorack modular synthesisers, VCV Rack's dangling patch cables, and two earlier experiments on this site: form controls drawn as instruments and the cassette deck from audio controls, which established that standard HTML form controls can be drawn inside a canvas as tactile audio hardware while keeping keyboard and touch input.

Live checks

Each check builds its own isolated fixture on testStage() and copies pixels into a plain 2D canvas to read them. The visible synth above isn't touched until the final check inspects whether it still has pixels.

ResultExperimentDetail

Findings

Built 2026-11-22. Live browser rendering, Android touch patching and Web Audio output are not verified yet; run the checks above in Chrome with HTML-in-canvas enabled to measure your browser.