plinq is a wrapper over the Web Audio API for giving interfaces sound. Most UI sound on the web is still a folder of audio assets to host, cache, and version. All to play a 40-millisecond click. The Web Audio API can synthesize that click outright, with no files at all. But its ergonomics are built for assembling a synthesizer, not for adding a tick to a toggle. Twelve exports, nine sound presets, about 1.9 kB gzipped, zero runtime dependencies. Presets are config objects declared ahead of time, and they run the same code path as a custom sound.
Safari silently disconnects audio output while still reporting the context as
running. Every guard you would naturally write passes, and the sound is gone anyway.
It also parks contexts in an interrupted state that isn't in the standard union,
which means widening the type to string just to compare against it. plinq suspends
on blur, discards any context that comes back closed or interrupted, and calls resume
unconditionally before every play. That replaced an async context, a visibilitychange
listener, and a statechange auto-resume I'd added across two earlier attempts.

plinq orb is a conversational front end for the library. You describe a sound in plain language, the model answers with parameters against plinq's schema, and the browser plays them. Most of the work is in the system prompt, which grew from 34 lines to 186. It's mostly sound design rather than instruction: which words imply layers stacked at once versus notes staggered by a delay, a hardcoded table of note frequencies, and recipes for common requests. The table is there because you can ask a model for E5 and get a confidently invented number.
The orb reads the generated envelope rather than the audio output, and uses it to displace a single icosahedron mesh every frame. An 8×8 ordered dither in the fragment shader gives it a halftone.
plinq is running on this site right now.
