Skip to content
pokoblinPublic

About

Split a song into six stems (drums, bass, vocals, piano, guitar, other) and export your own mix. macOS app + CLI in Rust, running Demucs on the GPU (Metal) — offline, no Python or ffmpeg.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Stemcraft icon

Stemcraft

English · 简体中文 · 繁體中文

Split a song into six stems — drums, bass, vocals, piano, other, guitar — then pick the ones you want and export them as a new mix. Inspired by Haig012/guitar-extractor, rewritten in Rust.

Both a CLI and a macOS desktop app are included. The desktop app separates a song (or a part of it), lets you mute / solo / balance the six stems while listening, and exports the mix — and optionally each stem and a chord chart — as WAV, FLAC, MP3, M4A (AAC) or OGG.

Separation runs Demucs htdemucs_6s on the GPU (Metal) through demucs-rs / Burn — no Python, PyTorch or ffmpeg. The GPUI (gpui-kit) desktop app reuses the same core crate.

The Stemcraft mixer in the dark theme

Layout

Path What
crates/core Library: decoding (Symphonia), separation, guitar/backing mixdown, chord detection, weights cache
crates/cli stemcraft command-line tool
crates/app stemcraft-app desktop app (GPUI)
misc/python_src Earlier Python prototype (demucs-mlx), kept for reference

Build

Requires Rust 1.98.1 (pinned in rust-toolchain.toml; rustup installs it automatically).

cargo build --release

Desktop app

cargo run --release -p stemcraft-app      # run from source
script/bundle-macos.sh                    # → dist/Stemcraft.app and dist/Stemcraft-<version>.dmg

The bundled app carries the model weights in Contents/Resources/, so it works offline with nothing else to install. It is ad-hoc signed, so on another Mac the first launch is blocked; open System Settings → Privacy & Security and click "Open Anyway" (on macOS versions before 15, right-click → Open also works). Distributing to others needs a Developer ID signature and notarization.

Settings (Stemcraft → Settings…, ⌘,) cover language (English, Simplified Chinese or Traditional Chinese; follows the system by default), appearance (follow system / light / dark), the export location and defaults, the audio output device, the GPU optimization cache and third-party licenses. They're saved to ~/Library/Application Support/Stemcraft/settings.json.

Command-line usage

stemcraft song.mp3                 # → output/song/song_guitar.wav, song_no_guitar.wav
stemcraft song.mp3 --chords        # + song_chords.lrc / .txt
stemcraft song.mp3 -r 1:30-3:00    # only process part of the song
stemcraft song.mp3 --all-stems     # + all six raw stems in output/song/stems/

(cargo run --release -- song.mp3 … works too.) Inputs: WAV, AIFF, FLAC, MP3, OGG Vorbis, M4A (AAC/ALAC); mono or stereo. Outputs are 32-bit float WAV at the input's sample rate, so the summed backing track never clips.

The first run downloads the model weights (~55 MB, Hugging Face) into ~/Library/Caches/demucs-rs/ and compiles/autotunes GPU kernels (cached under ~/Library/Application Support/autotune/); later runs start immediately.

Tests

cargo test

License

Stemcraft is released under the MIT License. Bundled third-party components — LAME, libvorbis, gpui and others — keep their own licenses, listed in the app under Settings → About.

About

Split a song into six stems (drums, bass, vocals, piano, guitar, other) and export your own mix. macOS app + CLI in Rust, running Demucs on the GPU (Metal) — offline, no Python or ffmpeg.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages