Skip to content
beneazePublic

About

Open-source DJ studio + live performance app in Rust: studio-grade stem separation (HTDemucs + Mel-Band RoFormer), automatic cues, beat-matched mixes, VirtualDJ-style decks

Resources

Security policy

Stars

14 stars

Watchers

0 watching

Forks

Repository files navigation

ClubCraft

ClubCraft

DJ software with studio-grade stem separation: plan mixes like DJ.Studio, play them like VirtualDJ, rebuilt in Rust.
Separate tracks into vocals, melody, bass and drums, let the analysis find the beats, keys, drops and mix points,
design beat-matched transitions in the studio, then take the same mix out on the live decks.

Rust macOS · Windows · Linux Stems: HTDemucs + Mel-Band RoFormer License: MIT OR Apache-2.0 Status: early alpha


The ClubCraft studio zoomed in on the first transition of a 28-minute mix: the outgoing and incoming track on two beat-matched lanes inside the transition frame, and the transition editor below with presets, categories and Off, Swap, Crossfade or Full for drums, bass, melody and vocals
A 28-minute mix imported from DJ.Studio, zoomed in on its first stem blend with the transition editor open.

Features · Everything in the box · Stems · Analysis · Under the hood · Get started · Downloads


🎚️ Studio-grade stems

Meta's HTDemucs and Mel-Band RoFormer run natively on the Apple GPU (CoreML) or any DX12 GPU (DirectML). On real tracks they match the PyTorch reference to more than 100 dB.

🧠 Cues that find themselves

Every track gets a beat grid, key, energy, sections and eight hot cues: Start, Mix In, Vocal, Build, Drop, Break and Mix Out. You don't place a single marker.

🔁 Studio ↔ Live

One library and one analysis. A mix designed in the studio plays on the live decks with the same mix points, and its auto cues are already on the pads.

⚡ Native and light

A lock-free Rust audio engine: about 1.5 % CPU per deck with keylock, stems and FX. Tracks that are playing stay locked in RAM, so playback doesn't stutter when the Mac is short on memory. Mixes stream track by track, so a 28-minute export stays under 300 MB.

Features

Every screenshot here is the real app at work on a mix imported from DJ.Studio. ClubCraft captures them itself through its developer control channel.

The studio timeline: two deck lanes with mixer headers (fader, solo, mute, EQ and filter knobs), stem-coloured clips with key badges, transition markers on their own strip, two sample lanes, the tempo lane gliding between 122 and 138 BPM, and the bottom bar with the transport, the Stems missing button and the panel tabs
Two deck lanes with their own mixers, two sample lanes, and the tempo gliding between 122 and 138 BPM.

Design the whole set

Drop tracks in and ✨ Harmonize orders them by Camelot key, tempo and energy arc, using simulated annealing over the whole set. Mix-in and mix-out points come from the analysed structure, and transition lengths fit the intro and outro of each pair.

Slide tracks and transitions by bars, collapse lanes, solo or mute them, shape a lane with its EQ and filter, and render the result to WAV with a cue sheet, faster than real time. Everything else lives in a DJ.Studio-style bar at the bottom: the transport, plus tabs for Zoom, Playlist (a sortable track table with keys, harmonic matches, energy and BPM), Transition, Track, Mashups and Master. Two sample lanes take one-shots, loops and FX dropped from Finder. Drag across a track's waveform to select a range and right-click to copy it to a sample lane: the full sound, or just its drums, bass, melody, vocals, instrumental or drums + bass (⌘L, ⇧⌘1–6). The copy is stretched and key-shifted like the mix plays it, or you can save it as a WAV. Every edit can be undone, and savepoints keep versions of a mix to switch between (none is lost on the way); Duplicate copies a mix to try something out.
The live view during an automix transition: two scrolling stem-coloured waveforms in phase, deck A playing Define (Club Mix) and deck B Alone, both at 122.5 BPM with eight auto-generated hot cues, the mixer in the middle with the automix moving the channel faders, and the browser with the automix queue below
Automix in the middle of a transition: both decks phase-locked, every hot cue placed by the analysis.

Then play it live

VirtualDJ-style decks: CDJ cue logic, eight hot cues, loops and loop rolls, beat jump, slip, keylock, key shift and match key, sync with a phase meter, stem knobs and pads (acapella, instrumental, drums only), three-band EQ with kill, filter and beat-synced FX.

Play live ▶ sends a studio mix to the decks and automix plays it at its planned mix points, moving the channel faders and EQs as it mixes. Or drag tracks into the automix queue.
The library sorted by BPM: tracks with stems marked by a green dot, BPM, Camelot key, energy, length and the number of generated cues
The library: BPM, key, energy and cues for every analysed track.

A library that analyses itself

Drop a folder in and every track is analysed within about a second. Stems are separated on demand: the parts of a track that a stem transition plays in, in seconds at the Fast quality, as soon as a mix needs them; whole tracks at your export quality before an export; or the whole library in the background if you switch that on. Sort and search by artist, title, BPM, key or energy, and drag tracks onto a deck or into a mix.

Imports your DJ.Studio projects: mix points, cues, transitions with their curves, stem automation and DJ.Studio's timing. The importer is built clean-room, from DJ.Studio's own files and exports only ([how it works](docs/interop/djstudio.md)). Exports beat grids, keys, hot cues and automix points to VirtualDJ.
The home page: recent mixes as a searchable list with their key colours, track count, length and last edit on the left; a New mix panel (start empty, from selected tracks, a playlist or auto-built from the library) and the library status with analysis and stem progress and recently added tracks on the right
The home page: recent mixes on the left, a new mix and the library status on the right.

Start anywhere

Start a mix from scratch, from selected tracks, from a playlist, or let ClubCraft auto-build one from analysed tracks in a BPM range. Recent mixes show their length, track count and harmonic journey at a glance, and the library panel shows how much is analysed and separated.
The Settings window on the Decks tab: cue button mode, hot cue behaviour, where a loaded track is parked, default pitch range, keylock, quantize and sync on load, and what to reset on load
Settings ▸ Decks, one of nine tabs (⌘, from the menu bar).

Behaves the way you play

Cue modes (CDJ, hold, cue-up-play), hot cue behaviour, load position, pitch ranges, crossfader and fader curves, auto gain and limiter, key notation (Camelot, Open Key or musical), waveform colours, BPM range, stem quality for playback and for export (an export separates weaker stems again first), default transitions and export formats. Audio shows the output, buffer size and a dropout counter, so you can see whether a buffer is too small.

Transitions you can read

Pick a preset (Stem blend, Bass swap, Crossfade, Vocal over, Mashup, Filter out, Echo out, Cut), then adjust it the way DJ.Studio does it: for every stem Off · Swap · Crossfade · Full, the same for each EQ band, plus volume, filter and echo choices. Or draw it in the timeline, like in DJ.Studio: a selected transition splits both tracks into drums, bass, melody and vocals rows, each with its curve. Press on a line to add a point, drag points (they stop at their neighbours; double-click removes one), slide a hard switch sideways by its edge, and switch a stem off on either side with its button. The same works for the volume, each EQ band and the filter. Drag a transition's bar to move it by beats (Shift: quarter beats) and its edges to change its length; the curves keep their shape. Lock a transition and harmonizing or recomputing mix points leaves it alone.

To switch stems off in any part of a song, drag across the waveform and right-click: mute drums, bass, melody or vocals there, or make that part an acapella or an instrumental.

Stems for a mix's stem transitions are separated automatically, only for the transition windows and at the Fast quality, so they are ready in seconds per transition. Until then the stem curves are imitated with volume and EQ: each transition keeps its own shape, and the timeline shows it marked "no stems". An export separates the whole tracks at the export quality first. The editor also warns when the outgoing track fades out before its transition ends, or when the incoming track comes in much quieter.

Keyboard first

Studio: Space play · ← → bar (⇧ 8 bars) · [ ] transitions · F follow · + − zoom · ⌘Z / ⇧⌘Z undo / redo · ⌘S save.
Live: Z X C and M , . cue/play/sync · 1–8 hot cues (⇧ deck B) · ← → crossfader.
MIDI controllers map with MIDI learn.

Find mashups

The mashup finder in the studio's bottom section: the vocals of Gorgon City's Mitsubishi matched against the library; every row shows the instrumental's bars, the vocal phrase, the key shift and tempo change, a strip with the fit of every bar, the rule score and the AI score, with preview, new mix and insert buttons

Want the vocals of one track over another? The 🎤 Mashups tab of the studio's bottom bar opens the finder. You can also start it from the track inspector, the library's context menu or ⇧⌘M. It searches your library for the instrumentals that carry those vocals, and tells you where.

  • Where it fits, bar by bar. For every 16-bar placement it compares the vocal notes with the instrumental's bass and chords, using a consonance table that knows a vocal a major seventh above a chord is colour but a semitone above it clashes. It also weighs masking by a loud melody in the vocal range, leftover vocals of the backing track, and the tempo and key change needed. On real tracks the original pairing beats its own ±1–2 semitone shifts 93 % of the time, where plain key matching or chroma similarity (as in AutoMashUpper) manages 84 %.
  • An AI second opinion. The best 20 candidates are rendered as the mix would play them, with the vocals shifted and stretched, and COCOLA (ICASSP 2025), a network trained on separated stems, listens to each. Blending both scores ranks the right match higher than either alone (84 % against random placements, from 78 %).
  • Hear it, then use it. ▶ plays the vocals over the instrumental straight away. New mix makes a two-track mashup, and Insert puts the instrumental after the vocal track in the open mix. Both use the new Mashup transition: the instrumentals swap within a bar and the vocals keep singing for the whole phrase.
  • For transitions too. In the transition editor, 🎤 Find vocal-over point finds where the outgoing vocals sound best over the incoming track and sets the transition with one click.

Everything in the box

🎚️ Stems

Fast (htdemucs), High (htdemucs_ft, four fine-tuned models) and Best (Mel-Band RoFormer vocals + htdemucs_ft) · CoreML GPU on macOS, DirectML on Windows, ONNX Runtime CPU on Linux and as the fallback · progressive separation while a track plays · 8-channel FLAC stem cache · residual playback, so unity stems are bit-exact with the original

🧠 Analysis

Constant-tempo beat grid fitted to about 1 ms · downbeat and phrase alignment · key detection (EDM-tuned profiles) · EBU R128 loudness and auto gain · energy 1–10 · sections (intro, verse, build, drop, break, outro) · 8 hot cues and phrase markers · optional All-In-One structure model

🗺️ Studio

Harmonic ordering (key, BPM, energy arc) · automatic mix points · beat-locked timeline with a tempo glide or a fixed BPM · per-lane gain, solo, mute, EQ and filter · 7 transition styles plus custom curves · lazy, memory-bounded preview · WAV export (16/24/32-bit) with a cue sheet

🎛️ Decks

Two live decks (plus two for the studio preview) · CDJ, hold and cue-up-play cue modes · 8 hot cues · loops from 1/32 to 32 beats, loop roll, slip · beat jump · keylock (Signalsmith Stretch) and key shift · sync with a phase meter · jog and scratch · brake and spinback

🔊 Mixer and FX

3-band isolator EQ with kill · resonant one-knob filter · crossfader curves · headphone cue on outputs 3/4 or a split cable · master limiter · recording · echo, ping-pong, reverb, flanger, filter LFO, gate, roll, bitcrusher, brake · per-stem echo-out

🔗 Interop

DJ.Studio project import (read-only, clean-room) · VirtualDJ database.xml export and import (merges safely and keeps a backup) · MIDI learn mappings in JSON · native macOS menu bar and a window without a title bar

Stems without compromise

Stem quality is the heart of ClubCraft. The separation runs the original networks: no lighter re-trained model, no cloud service.

  • Faithful to the reference. The neural cores of HTDemucs and Mel-Band RoFormer are exported once (tools/model-export). The STFT, segmenting, overlap-add, shift trick and bag-of-models weighting are reimplemented in Rust to match demucs.apply exactly. On real house tracks, full-pipeline output matches Python Demucs at 110–128 dB on CoreML, so any difference is inaudible.

  • Best quality. Mel-Band RoFormer separates the vocals, about 2.7 dB better than htdemucs_ft on public benchmarks. htdemucs_ft then splits the remaining instrumental into drums and bass, and melody is what's left. The four stems still sum back to the mix exactly.

  • Speed on an M1 Pro, for a 5-minute track:

    Quality Models Time
    Fast htdemucs ≈ 17 s
    High htdemucs_ft (4 models) ≈ 80 s
    Best Mel-Band RoFormer + htdemucs_ft ≈ 2.3 min

    A track loaded on a deck before it was separated gets usable stems under the playhead in about a second.

  • Light on memory. Stems are held as 16-bit samples with one scale per stem, heavy jobs never overlap, and idle models are released. A full Best separation peaks at about 2 GB.

Analysis that knows your music

The analysis was tuned and checked against DJ.Studio's and Mixed In Key's results for 137 real tracks (cargo run --release -p clubcraft-analysis --example eval).

Result
BPM within 0.05 99.3 %
Beat phase within 15 ms 98.5 %
Downbeat (bar phase) 96.3 %
Key exact or relative 86.9 %
Time per track (without the deep structure model) ≈ 0.1–0.5 s

The cue generator places Mix In at least 32 beats before the first drop or vocal, on a phrase line. Mix Out goes on the outro, or 32 to 64 beats before the music ends. Drops land on their downbeat. The studio aligns each incoming Mix In with the outgoing Mix Out, which is why mixes line up without any manual work.

Under the hood

  • Six crates: core (data model, SQLite library, planner, beat-locked mix timeline), audio (decoding, tags, resampling), stems, analysis, engine (real-time audio, mix conductor, renderer, MIDI) and app (egui).
  • Real-time engine: a lock-free command queue in, a triple-buffered state snapshot out, and nothing allocated or locked on the audio thread. Stems are mixed before the stretcher, so each deck needs only one time-stretcher.
  • No page faults while playing: a background thread locks the audio and stems of every track a deck or mix player holds in RAM (mlock), and unlocks them when they are released. Without it, a Mac under memory pressure compresses the part ahead of the playhead, and a single read stalled the audio callback for up to 6 ms.
  • One conductor: the studio preview, live automix and offline render all run the same code path, so what you hear in the preview is exactly what you export.
  • Exact timing: tempo is piecewise linear in mix beats and integrated analytically, which keeps overlapping tracks beat-locked to within a millisecond.
  • Clean-room: ClubCraft is independent. Other DJ software is only studied through its files, its output and public documentation, never through its program code, and none of its code, models or assets are used. The DJ.Studio importer was rebuilt under that rule; see docs/clean-room.md.
  • Never crash: no unwrap, expect or panic outside tests, and unsafe code only in five FFI modules, each block with a SAFETY note. Clippy enforces both. The contributor rules are in AGENTS.md.
  • Tested: 84 unit and integration tests, plus evaluations against Python Demucs and a 137-track analysis corpus.

Talk to it: built-in MCP server

ClubCraft includes a Model Context Protocol server, so Claude or any other MCP client can work with your library in plain language. For example: "build a 45-minute warm-up from my 120–124 BPM tracks with energy rising, use stem blends, and export it". It runs headless on the same library as the app, and changes appear in an open ClubCraft window right away.

# Claude Code
claude mcp add clubcraft -- /Applications/ClubCraft.app/Contents/MacOS/ClubCraft mcp

For Claude Desktop or other clients, add it to the MCP config (on Windows, the command is the path to ClubCraft.exe):

{ "mcpServers": { "clubcraft": { "command": "/Applications/ClubCraft.app/Contents/MacOS/ClubCraft", "args": ["mcp"] } } }
Tools
Library library_overview, search_tracks (text, BPM, key, harmonic match, energy, stems), get_track (grid, key, loudness, sections, hot cues), import_tracks
Processing analyze_tracks, separate_stems (Fast to Best, with progress and cancel), set_hot_cue
Studio list_mixes, get_mix, create_mix (harmonic ordering), edit_mix, set_transition, set_mix_points
Mashups find_mashups (where the vocals of one track fit over other tracks' instrumentals), create_mashup_mix
Export export_mix (WAV plus cue sheet), export_virtualdj (grids, keys and cues into database.xml)

Separation and rendering share a lock with the app, so only one heavy job runs at a time.

Get started

git clone https://github.com/beneaze/ClubCraft
cd ClubCraft
cargo run --release -p clubcraft          # the app
cargo test -p clubcraft-core -p clubcraft-engine
tools/bundle-macos.sh                     # target/ClubCraft.app, models included
tools/package-linux.sh                    # dist/ClubCraft on Linux, models included

The separation models (≈ 3 GB) aren't in git. Export them once from the official checkpoints with the script in tools/model-export; models/README.md has the commands. On Windows, use .\tools\package-windows.ps1. On Linux, install the ALSA headers and cmake first (sudo apt install libasound2-dev pkg-config cmake on Debian/Ubuntu), then tools/package-linux.sh builds dist/ClubCraft.

Your library, stems, waveforms, exports and recordings live in ~/Music/ClubCraft (CLUBCRAFT_HOME changes that).

Important

Status: ClubCraft is in early alpha. The studio, live decks, stems and analysis work end to end and are tested, but expect rough edges. Back up your music folders, and keep VirtualDJ closed while ClubCraft writes to its database.

Downloads

Latest release: v0.3.2

Platform File Notes
macOS 13+ (Apple Silicon) ClubCraft-0.3.2-macos-arm64.dmg All CoreML stem models and the COCOLA mashup model bundled. Ad-hoc signed: right-click › Open the first time
Windows 10/11 (x64) ClubCraft-0.3.2-windows-x64.zip ClubCraft.exe, DirectML.dll, the ONNX stem models and the COCOLA mashup model
Linux (x64, glibc 2.35+) ClubCraft-0.3.2-linux-x64.tar.gz X11 or Wayland, ALSA (PipeWire and PulseAudio through their ALSA plugins), the ONNX stem models and the COCOLA mashup model. Separation runs on the CPU

Development builds: tools/bundle-macos.sh (macOS), and the ClubCraft-windows-x64 and ClubCraft-linux-x64 artifacts of every CI run (without models).

License

ClubCraft is dual-licensed under MIT or Apache-2.0. Third-party code, models and fonts are listed in ATTRIBUTION.md. The Demucs weights are MIT (Meta Platforms). The Mel-Band RoFormer checkpoint (Kimberley Jensen) and ZFTurbo's implementation are MIT, and so is Signalsmith Stretch. COCOLA (Ciranni et al.) is MIT; its checkpoint was trained on datasets that include MoisesDB, which is licensed for non-commercial research. DJ.Studio and VirtualDJ are trademarks of their respective owners, and ClubCraft is not affiliated with either.

About

Open-source DJ studio + live performance app in Rust: studio-grade stem separation (HTDemucs + Mel-Band RoFormer), automatic cues, beat-matched mixes, VirtualDJ-style decks

Resources

Security policy

Stars

14 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages