Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/cocreating/4StemPlayer/llms.txt

Use this file to discover all available pages before exploring further.

4Stem Band Player is a browser-based rehearsal tool that loads a static song catalog, decodes up to seven MP3 stems per song entirely in the browser, and plays them in perfect synchronization using the Web Audio API. There is no server, no account, and no upload form — everything runs from pre-placed static files.

What It Does

The player fetches a manifest.json catalog at startup, then for the selected song it decodes all available MP3 stems concurrently and locks them to a single shared playhead. You can mute or solo any stem, adjust its volume with a fader, and seek anywhere in the song by clicking a waveform rendered from precomputed peak files. A compact floating Mixer panel exposes vertical faders and live LED meters for each stem, synchronized with the full stem rows below. Additional tools built into the player include:
  • Transport controls — Play, Pause, Stop, and waveform seek, plus a Space bar shortcut for play/pause
  • Global transpose — shift all non-drum stems up or down by semitone using SoundTouch AudioWorklet pitch processing
  • Section navigation — jump directly to named markers within a song
  • Lyrics viewer — formatted lyrics rendered from a Markdown file bundled with each song
  • Chord charts — structured chord metadata displayed alongside section markers
  • Low-memory (Lite) mode — downmixes stems to mono at 22 kHz to reduce decoded memory footprint on mobile devices
  • PWA install — installable to a phone home screen; songs cached after first play are available offline
  • Media Session integration — lock screen and Bluetooth controls work with the player’s transport state

Supported Stems

The preferred rendering order for stems is vocals, guitar, strings, drums, bass, fx, and other. Any stem present in the song folder is loaded automatically. The three required stems for every song are bass, drums, and vocals; all others are optional.

Built-in Song Catalog

Five demo songs ship with the repository and are ready to play immediately after cloning:
FolderTitleArtist
BambolaLa bambolaPatty Pravo
GloryBoxGlory BoxPortishead
IkesRap2Ike’s Rap 2Isaac Hayes
SendHLTMeSend His Love to MePJ Harvey
YouMightThinkYou Might ThinkThe Cars
Each folder contains the MP3 stems, precomputed waveform peak JSON files, song.json metadata, and a lyrics.md file.

Technical Foundation

LayerTechnologyVersion
App frameworkSvelteKit2.59.1
UI runtimeSvelte 5 (runes syntax — $state, $derived, $effect, $props)5.55.7
LanguageTypeScript6.0.3
Build toolVite8.0.11
Audio engineWeb Audio API (AudioContext, AudioBufferSourceNode, GainNode)
Waveform renderingwavesurfer.js7.12.6
Pitch shiftingSoundTouch @soundtouchjs/audio-worklet
TestsVitest — 17 test files, 100 tests4.1.5
The SvelteKit route is fully prerendered to static HTML. All audio work starts after the browser mounts the component, so there is no server-side audio dependency of any kind.

What This App Is Not

  • No upload UI. New songs are added by placing files in static/songs/ and running a preparation script.
  • No authentication or user accounts. The app is fully public and stateless on the server.
  • No server-side song management. The catalog is a static JSON file generated at build time.
  • No persistent mix settings. Volume, mute, and solo state reset when you switch songs. The player does remember your theme, last-selected song, and Lite mode preference in localStorage.
To add a new song, place its MP3 stems and metadata in static/songs/<SongFolder>/, then run npm run songs:prepare to validate the folder, generate waveform peaks, and regenerate the manifest.

Where to Go Next

Quickstart

Clone the repo, install dependencies, and run the dev server in under five minutes.

Adding Songs

Learn the song folder structure, required stems, and the preparation workflow.

Player Controls

Explore transport controls, the mixer panel, transpose, and keyboard shortcuts.

Architecture

Understand the SvelteKit static adapter, audio engine, and state ownership model.

Build docs developers (and LLMs) love