The brief from Sonic Artistes was simple to describe and hard to solve. Musicians needed to rehearse with a full backing track while being able to isolate, mute, or solo any individual instrument stem — in real time, in the rehearsal room or at home, without specialist hardware.

The obvious route was a DAW-based solution. Ship a Logic template, or a Pro Tools session, or a standalone Mac app wrapping a commercial audio engine. Every one of those options hit the same wall: musicians don’t want to install software. They want to open a link.

So we built it in the browser.

Web Audio API is the quiet hero here

The entire stem player sits on top of the Web Audio API. Each stem is its own AudioBufferSourceNode routed through a GainNode, and the mixing UI just nudges gain values in real time. Latency is effectively zero on modern hardware. Playback speed adjusts without pitch-shifting via playbackRate. The whole audio graph is about 60 lines of code.

The surprise wasn’t that it worked — it was how stable it was. Across Safari, Chrome, and Firefox, on laptops, iPads, and Android phones, the same code powers the same experience. Zero framework. Zero build step. Static files on Cloudflare Pages.

Authentication is the hard bit

The naive approach to a streaming audio app is to drop stems in a bucket and link to them. That falls over the moment you need per-user access, revocable links, or anti-scraping.

We landed on PocketBase generating short-lived file tokens per request. The client asks for a song, PocketBase validates the session and returns a signed URL that lives for a minute. Stem URLs are never exposed to the frontend directly — they never even reach the browser’s network tab in a reusable form.

Offline mode wasn’t an afterthought

For touring environments, internet is a gamble. So the app can run entirely from a local data export using the File System Access API. The same UI code powers both the cloud-connected and fully offline experience — we just swap the data adapter at runtime.

That constraint shaped the architecture from day one. Every data call goes through a thin adapter layer. Swap one dependency and the whole app works without a server.

What I’d change

If I were starting again I’d reach for a service worker for offline mode rather than File System Access — the API is still patchy on Safari and the UX of pointing at a local folder is awkward for non-technical users. But for the Sonic Artistes community, where most offline use happens on known devices, the current approach has held up fine.

The player is live at multitrack.sonicartistes.com and in daily use.