PRO

Patch Cables

A lattice of lime dots on slate that you play with the cursor. Hover and nearby dots fuse into gooey cables; drag to patch cables that fill with ink and carry signal beads from jack to jack. Every cable that closes plays a note on a pentatonic scale, through four synth voices with a shared delay and reverb. Generators can play it on their own, in time with one tempo. One WebGL2 shader and Web Audio, no dependencies.

Component
Click and hold to patch
Tempo
108
Install
npx shadcn@latest add @compronents/patch-cables

Installs from ui.aryank.space. Needs a registry token and a one-time @compronents entry in components.json. The docs walk through both.

Files
Checking access…
API
PropTypeDefaultDescription
palettePatchCablesPalettePATCH_CABLES_PALETTES[0]Background, dots, patch ink, jack sockets and signal core, plus an optional fluid colour. PATCH_CABLES_PALETTES has the three palettes of the original.
voice"off" | "mist" | "pluck" | "bloop" | "acid""mist"Synth voice. Changing it starts the audio and plays one note at the centre of the grid.
bpmnumber108Tempo shared by the generators, the signal pulses and the sequencer, 60 to 180.
effectsPartial<PatchCablesEffects>—magnet, ripples, sockets, signal, fluid and grain on, breathe and scope off.
generatorsPartial<PatchCablesGenerators>—wander, rain, selfpatch, lfo and seq, all off. They play the field on their own, in time.
reachnumber2.2Cursor reach in lattice cells, 0.6 to 6. Fast strokes reach up to 60% wider.
smoothingnumber0.55Cursor smoothing, 0 to 1. Also softens the springs.
trailDecaynumber1Seconds a hovered cell keeps its pull, 0 (off) to 3.
tool"patch" | "erase""patch"What a drag does. Holding Shift swaps it.
fadePatchesbooleantrueHand-drawn patches fade 5 seconds after they are drawn.
spacingnumber40Lattice pitch in CSS px, 16 to 90. Changing it rebuilds the grid.
dotSizenumber0.47Dot radius in lattice units, 0.28 to 0.62.
goonumber0.79Neck width and blend softness, 0 to 1.
minNecknumber0.62Narrowest neck as a share of the full one, 0.2 to 1.
pattern"tiles" | "patchbay" | "none""tiles"Pattern laid down on mount. Later changes go through the ref: clear(), tiles(), patchbay().
showHintbooleantrueThe pill that fades in after load and leaves after the first patch.
showReadoutbooleantrueThe corner readout: visible grid size and cable count.
classNamestring—Classes for the root. It fills its parent, so give the parent a height.
styleCSSProperties—Additional styles for the root.
Dependencies
None.