~303.3 MB CPU WASM Demucs v4 + Basic Pitch 0 Bytes Uploaded
About & Code

Standalone App & PWA

Launch Stem Deck on its dedicated origin to install it as an offline PWA with audio/* file handlers (.mp3, .wav, .ogg, .webm, .flac).

Open stems.webai.show ↗

Honest cache note: browsers isolate Cache Storage per origin, so stems.webai.show stores its own local ONNX weights (~303.3 MB). Staying on webai.show shares cached weights with the Demucs and Basic Pitch model pages.

Sample audio: “The CC BY Song” by loveshadow & Victor Stone — CC BY 3.0, via ccMixter.

15.5s – 23.3s

Stage 1 · Demucs v4 Splitter (303 MB fp32 · CC-BY-NC-4.0)

MrCitron/demucs-v4-onnx · Drums · Bass · Other · Vocals

Stage 2 · Spotify Basic Pitch (0.3 MB fp32 · Apache-2.0)

spotify/basic-pitch · 22.05 kHz Polyphonic Audio-to-MIDI

0 bytes uploaded. Load the 2 local WASM workers above to split stems and transcribe MIDI on-device.

7.80s · 44.1 kHz stereo · 0 bytes uploaded
Source Window–
Sum ReconstructionAwaiting Demucs
Vocals Energy–
Basic Pitch MIDIAwaiting Basic Pitch
Worker Latency–

Stage 1 · 4-Channel Stem Remix Deck

00:00.00 / 00:07.80 Full Window
Practice Speed:

1-Click Console Presets

Master 3-Band EQ & Offline Mixdown Bounce

Stage 2 · Stem-to-MIDI (Basic Pitch)

Key: – Tempo: – 0 notes

Extracted MIDI Note Events

# Note (MIDI) Start Duration Conf

Real Local Exports (SMF Type-0 .MID · OWASP-Safe .CSV · .JSON)

How Stem Deck Works

Two audited WebAssembly audio workers chained strictly off the main thread — Hybrid Transformer Demucs v4 (MrCitron/demucs-v4-onnx, 303 MB fp32 · CC-BY-NC-4.0) and Spotify Basic Pitch (spotify/basic-pitch, 0.3 MB fp32 · Apache-2.0) — sharing Cache Storage with zero bytes uploaded.

44.1 kHz Stereo Graph

Demucs embeds its own STFT inside htdemucs.onnx, transforming raw [1, 2, 343980] stereo frames directly into 4 phase-coherent waveforms whose sum closely reconstructs the original mix.

Live Console + Offline Bounce

Each stem routes through synchronized GainNode, StereoPannerNode, and AnalyserNode meters, while OfflineAudioContext bounces the exact custom mixdown to 16-bit RIFF PCM .wav.

Stem-to-MIDI Binary SMF

Isolating vocals or guitar before resampling to 22.05 kHz mono eliminates drum bleed, letting Basic Pitch extract cleaner polyphonic note matrices exported directly as standards-compliant Type-0 .mid.

Show the code — computeStemAnalytics() per-stem RMS share and reconstruction correlation
Show the code — resampleStereoToMono22k() 44.1 kHz stereo stem to 22.05 kHz Basic Pitch input
Show the code — pickMidiNotes() polyphonic note and onset matrix peak-picking
Show the code — encodeSmfType0Midi() binary Standard MIDI File Format 0 encoder
Show the code — escapeCsvCell() OWASP formula-injection neutralization for RFC 4180 CSV
Show the code — StageWorkerClient coalesced load, FIFO queue, and terminate-safe disposal
Show the code — createMicGuard() startGen abort guard and deterministic MediaStream cleanup
Show the code — registerStemDeckWebMcpTools() 2-arg WebMCP registration with AbortController