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.
npx shadcn@latest add @compronents/patch-cablesInstalls from ui.aryank.space. Needs a registry token and a one-time @compronents entry in components.json. The docs walk through both.
Checking access…
| Prop | Type | Default | Description |
|---|---|---|---|
| palette | PatchCablesPalette | PATCH_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. |
| bpm | number | 108 | Tempo shared by the generators, the signal pulses and the sequencer, 60 to 180. |
| effects | Partial<PatchCablesEffects> | — | magnet, ripples, sockets, signal, fluid and grain on, breathe and scope off. |
| generators | Partial<PatchCablesGenerators> | — | wander, rain, selfpatch, lfo and seq, all off. They play the field on their own, in time. |
| reach | number | 2.2 | Cursor reach in lattice cells, 0.6 to 6. Fast strokes reach up to 60% wider. |
| smoothing | number | 0.55 | Cursor smoothing, 0 to 1. Also softens the springs. |
| trailDecay | number | 1 | Seconds a hovered cell keeps its pull, 0 (off) to 3. |
| tool | "patch" | "erase" | "patch" | What a drag does. Holding Shift swaps it. |
| fadePatches | boolean | true | Hand-drawn patches fade 5 seconds after they are drawn. |
| spacing | number | 40 | Lattice pitch in CSS px, 16 to 90. Changing it rebuilds the grid. |
| dotSize | number | 0.47 | Dot radius in lattice units, 0.28 to 0.62. |
| goo | number | 0.79 | Neck width and blend softness, 0 to 1. |
| minNeck | number | 0.62 | Narrowest 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(). |
| showHint | boolean | true | The pill that fades in after load and leaves after the first patch. |
| showReadout | boolean | true | The corner readout: visible grid size and cable count. |
| className | string | — | Classes for the root. It fills its parent, so give the parent a height. |
| style | CSSProperties | — | Additional styles for the root. |
None.