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

20 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: beta


The ClubCraft studio zoomed in on the third transition of a 23-track mix: inside the transition frame both tracks are split into drums, bass, melody and vocals rows, each with its curve and an on/off button, the bass swapping halfway; below, the transition editor with presets, categories and Off, Swap, Crossfade, Full or Manual for every stem
A 59-minute, 23-track mix zoomed in on a bass swap: every stem of both tracks has its own row and curve, and the transition editor is open below.

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 23-track mix. ClubCraft captures them itself through its developer control channel.

The studio timeline of a 59-minute mix: two deck lanes with mixer headers (fader, solo, mute, EQ and filter knobs), 23 stem-coloured clips with key badges, transition markers on their own strip, vocal samples on the first sample lane, the tempo lane gliding between 122 and 127 BPM, and the bottom bar with the transport and the panel tabs
A whole set at a glance: two deck lanes with their own mixers, vocal samples on a sample lane, and the tempo gliding between 122 and 127 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 by bars and transitions by beats (finer when you zoom in, Shift for free moves), select several clips with a box or Shift-click, 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; tracks joined by locked transitions are linked and drag as one group), Transition, Track, Mashups and Master. 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 playing a studio mix with automix: two scrolling stem-coloured waveforms, deck A playing MK - 17 at 122 BPM and deck B cued at the Mix In of Do You Still Care, both with eight auto-generated hot cues, the mixer in the middle with AUTOMIX on, and the browser with the mix's tracks and the automix queue below
A studio mix on the live decks: automix plays it at its mix points, and every hot cue was 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 showing a mix's 23 tracks in mix order: tracks with stems marked by a green dot, BPM, Camelot key, energy, length, genre 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; the same parts again 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 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 the stem transitions again first if their stems are weaker), 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, Filter out, Echo out, Cut, and Mashup with the old or the new vocals), then adjust it the way DJ.Studio does it: for every stem Off · Swap · Crossfade · Full, the same for each EQ band, plus volume and effects: filter, echo, reverb and noise risers, and Rhythm FX with loops and rolls, a vinyl brake and a side-chain pump. They play in the preview, the export and automix, with or without stems.

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, and the effects it uses get a row each. Press on a line to add a point, drag points between their neighbours, bend a slope by its handle, double-click a slope to make it a hard switch, ⌘-drag to draw flat steps on the grid, and switch a stem off on either side with its button. A hard switch slides sideways as one, and the other track's switch goes along, so a swap stays a swap. The same works for the volume and each EQ band. Drag a transition's bar to move it 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 those windows again at the export quality first, not the whole tracks, so a Best export takes a fraction of the time. The editor also warns when the outgoing track fades out before its transition ends, or when the incoming track comes in much quieter.
A vocal sample on the first sample lane under a transition: the clip, copied from Come Find Me and locked to it, is selected and shows its volume curve fading in and out over its waveform, with a selector for Volume, Low, Mid, High and Effects in its title bar
The vocals of a track copied to a sample lane, locked to it and faded in with their own volume curve.

Samples that follow the music

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.

A copy stays linked to its track. Drag its edges to cut it shorter or to bring in more of the track before or after it. When the track gets better stems (or an export separates that part at the export quality), the clip is cut again from them. It's locked to its track, so it moves along when the track moves in the mix. Every clip has its own volume, EQ, filter and effect curves, drawn like a transition's, and each sample lane plays through a channel strip of its own.

Keyboard first

Studio: Space play · ← → bar (⇧ 8 bars) · [ ] transitions · F follow · + − zoom · ⌘Z / ⇧⌘Z undo / redo · ⌘S save · ⌫ remove the selection.
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 MK and Clementine Douglas' Come Find Me matched against the library; every row shows where in the instrumental it goes (bars, time and section, such as a drop), the chorus it uses, 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 both ways round: the instrumentals that carry a track's vocals, or the vocals that fit over its instrumental. And it tells you where.

  • Whole phrases in the right place. It takes whole sung phrases (the chorus first, found by the structure model) and tries them where the other track's sections start: a chorus on a drop, a verse on a breakdown or groove, never on an intro or outro.
  • Where it fits, bar by bar. For every 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 a Mashup transition: the instrumentals swap within a bar and the vocals keep singing for the whole phrase, the old vocals over the new track or the new vocals over the old one.
  • 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 · 9 transition styles plus custom curves with bends and hard switches · two sample lanes with their own curves and effects · 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 · transition effects: reverb send, noise sweeps, beat loops, vinyl brake, side-chain pump

🔗 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: 154 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 beta. 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.4

Platform File Notes
macOS 13+ (Apple Silicon) ClubCraft-0.3.4-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.4-windows-x64.zip ClubCraft.exe, DirectML.dll, the ONNX stem models and the COCOLA mashup model
Linux (x64, glibc 2.35+) ClubCraft-0.3.4-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

20 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages