All work

Physical Piano

A grand piano built from physics, played live in the browser

Physical Piano with a C major chord held: the keys lit on the on-screen keyboard and a live spectrum showing sharp partial peaks

What I was exploring

Most software pianos are libraries of recorded notes. They sound good, but you can't change what the instrument is made of. You can't make the strings stiffer, swap the hammer felt, or move the piano into a different hall without someone recording it all again.

This project asks a different question: can the sound come from the physics itself, fast enough to play live in a web page, with every setting tied to a real property that a computer could later tune to match a real piano?

What I built

  1. Each key is a set of vibrating string modes with real inharmonicity, frequency-dependent loss and one to three slightly detuned strings, run inside an AudioWorklet so it plays with no plugin or install.
  2. The hammer is modelled as compressible felt that pushes back nonlinearly, so playing harder changes the tone, not just the volume. Dampers, the sustain pedal and restrikes on ringing strings are handled too.
  3. A soundboard model and three radiating zones (bass, mid, treble) carry the sound out of the instrument.
  4. A room solver combines image sources and ray tracing over materials per frequency band to build the room's response. Its reverb and clarity figures are shown next to a plan and elevation you can edit.
  5. Every parameter is physical and set per register, so the whole piano and room fit in a vector that a fitting tool can adjust later.
  6. The same engine runs headless in Node, so a phrase can be rendered offline to an exact, repeatable audio file for testing and comparison.

What it does

Built with JavaScript (no framework), Web Audio AudioWorklet, Web Workers, Node.js, socket.io, 2026.