← BACK TO HOME

INTERACTIVE / CREATIVE CODING

All Things Scored

A browser instrument played by motion

Screenshot of All Things Scored

I split it into three parts that all run live in the browser: computer vision catches anything crossing the line, Web Audio turns each crossing into sound, and a scale mapping picks the note. The playable version is on GitHub Pages, and the code is public.

ROLE

Solo developer

STACK

React · TypeScript · Tone.js · Canvas

Solo project · steady 60fps · playable online

HIGHLIGHTS

  1. Scans one line only: an adaptive background model (an EMA with learning rates of 0.01 when triggered and 0.06 otherwise) samples just the one scanline along the trigger line, and the piece runs at a steady 60fps
  2. Never off-key: position sets pitch and intensity sets velocity, and every pitch snaps to the scale, so nothing lands between notes
  3. Dense motion doesn't clip: notes play on a Tone.js PolySynth through an effects chain and can snap to the Transport beat (@8n/@16n); each of 20 segments has a cooldown that throttles voices
  4. Refs in the rAF loop: the high-frequency loop syncs state through refs, which avoids stale closures

LIVE SITE ↗GITHUB ↗