banger
Web Audio sample players: one-shots, sample banks and loopers, each with gain, pan, pitch drift and playback rate. A spatial mixin maps a 2D listener and source onto pan, gain and a lowpass.
npm i @dank-inc/banger
Thirteen open-source packages on npm. Every one has a live demo you can operate in the browser — no install required to see what it does.
all MIT · @dank-inc on npm
The browser's audio stack with the boilerplate removed.
Web Audio sample players: one-shots, sample banks and loopers, each with gain, pan, pitch drift and playback rate. A spatial mixin maps a 2D listener and source onto pan, gain and a lowpass.
npm i @dank-inc/banger
Convert between MIDI note numbers, note names and frequencies. Three functions, no dependencies — the lookup every synth project rewrites.
npm i midi-translate
A sketch is a function that returns a frame function. The closure is where your state lives — there is no class to extend and nothing to subscribe to.
2D canvas sketch framework. Hands the frame function a flat params object: the context, draw helpers bound to it, a clock, and the maths.
npm i @dank-inc/sketchy
The same frame model over three.js, with use* helpers for cameras, geometry, materials and lights. They return real three objects, so you can drop to the library at any point.
npm i @dank-inc/sketchy-3d
React bindings for sketchy. Mount a sketch as a component and let the effect own the canvas lifecycle, or hand SketchBrowser a set and page through them.
npm i @dank-inc/react-sketchy
Signal maths and random helpers for generative work. Sine and cosine over a 0..1 parameter, pre-scaled and offset; lerp, map, quantize; seeded and shaped randoms.
npm i @dank-inc/numbaz
Loop and map helpers that hand you the normalised parameter alongside the index, so generative code stops recomputing i / n. Includes the 2D form for grid work.
npm i @dank-inc/lewps
Small hooks and components, each doing one thing.
Two hooks for reading a resource: one takes a path, the other takes a promise you already hold. Both return a discriminated { data, error, loading } union, so narrowing gives you a non-null value.
npm i @dank-inc/use-get
A hook that keeps an object in localStorage — JSON in, JSON out, with a default to fall back to when the slot is empty or unparseable.
npm i @dank-inc/react-loco-storage
A small component set — Button, AppHeader, Page — themed entirely with CSS custom properties, so a consuming app restyles it by setting four variables.
npm i @dank-inc/dank-design
State you read in a render loop, rather than events you wire up.
A pointer-state object you read each frame instead of wiring six listeners: normalised coordinates, button map, scroll accumulators, and a decaying inertia value for flick gestures.
npm i @dank-inc/super-mouse
A typed in-memory CRUD store for prototyping and mock APIs. Five methods over an array of records with ids.
npm i @dank-inc/data-buddy
A settings overlay you drop onto any page with one script tag. Register your fields and it renders the UI, binds them to URL params, persists to localStorage, and keeps all three in sync — so a configured page is a shareable link.
npm i @dank-inc/dankstore
Every demo page is built on one design system, served from a single place — so a brand edit repaints all of them without rebuilding a single package.
The WaveLoop design language for the web: tokens plus custom elements. Works in both vanilla and React demos, because custom elements are the one component format both halves can use. It also generates /branding/console.css.