DJ Scorer Data
Everything produced on the way to training a vocal-over-beat compatibility scorer: a small model that predicts how well one song's vocal sits on another song's instrumental.
Why this exists
This is the first building block of an independent, non-commercial research project asking a simple question: how much of a DJ's musical judgement can a machine learn? Beat-matching two songs is a solved problem. Knowing which two songs belong together is not, and that is the part this data is for.
The rest of the project is still in progress and will be shared when it is ready. The data is published now because the expensive part (separating and analysing thousands of tracks) only needs doing once, and other people studying mashups, source separation or music similarity may find it useful.
Intended use
Non-commercial research and education. That is what it was made for and what it is being used for here.
Most of the underlying music (about 85% of the tracks) is licensed for non-commercial use only, so the dataset as a whole should be treated as non-commercial. Please do not use it to build or train a commercial product or service. If you need commercially usable material, filter down to the minority of tracks whose licence allows it (see Licences below) and check each one.
Good fits: studying vocal and instrumental compatibility, benchmarking beat or key estimation, experimenting with source-separation output, teaching.
The source audio is travis-moore/dj-music, about 7,900 openly licensed hip hop tracks from the Free Music Archive. This repository holds what was computed from it:
| Folder | What it is | Made with |
|---|---|---|
stems/ |
removed after training (a vocal and an instrumental stem per track; see below to regenerate) | Demucs htdemucs |
analysis/ |
beats, tempo, key and vocal activity for every track | beat_this, librosa |
pairs/ |
the list of good and bad vocal/instrumental pairings used for training | this project |
embeddings/ |
encoder features for every pair, ready to train on | m-a-p/music2vec-v1 |
Final contents. 7,931 tracks analysed, about 245,000 pairs, 123 embedding files (14.6 GB). The separated stems (86 GB) were deleted once training finished, to free storage.
Stems (no longer hosted)
The stems were removed from this repository after training. This section documents how they were made, so the pair lists (which refer to stem positions) remain interpretable. To regenerate them, run Demucs htdemucs on the tracks in dj-music, sum everything except the vocal into one instrumental, down-mix to mono and resample to 24 kHz.
stems/<track id>/vocals.flac mono, 24 kHz, 16-bit FLAC
stems/<track id>/instrumental.flac mono, 24 kHz: drums + bass + everything else, summed
stems/<track id>/meta.json title, artist, licence, duration, path of the original in dj-music
Track ids are fma_<6-digit FMA track id>, the same ids as in dj-music. Stems are down-mixed to mono and resampled to 24 kHz because that is what the scorer's encoder needs; they are not mixing-quality stems.
Analysis
analysis/<track id>.json, one per track:
| Field | Meaning |
|---|---|
seconds |
duration |
bpm |
tempo from the median beat spacing (0 if too few beats were found) |
beats |
beat times in seconds |
beat_tracker |
beat_this normally; beat_this_few when fewer than 8 beats were found (a cappella, spoken word) |
key |
tonic (0 = C … 11 = B), mode, name, and a confidence correlation score |
vocal_activity |
one 0/1 flag per half second: is the vocal stem clearly audible |
vocal_share |
fraction of the track with audible vocal |
id, source, bucket, artist, title |
copied from the track metadata |
Pairs
pairs/pairs-wNN.jsonl lists the training examples; tracks were processed in batches ("waves"), one file per wave. Each line names an 8-second vocal clip and an 8-second instrumental clip to lay it over:
type |
Vocal over… | label |
|---|---|---|
pos_aligned |
its own instrumental, same moment | 1 |
pos_shifted |
its own instrumental, a different section, still on the beat | 1 |
neg_other |
another track's instrumental, tempo-matched and beat-aligned | 0 |
neg_offbeat |
its own instrumental, pushed off the beat | 0 |
Each side has a track id, a start time and a time-stretch rate. Every clip is stretched by a similar random amount whatever its label, so stretching artefacts do not give the label away. neg_other rows also carry key_distance (steps apart on the circle of fifths).
split is train, val or test, assigned by track, so no track appears in two splits and a negative's two tracks always share a split. pairs/waves.json records which wave each track belongs to.
Embeddings
embeddings/<split>-wNN-KKKK.npz, up to 2,048 pairs per file:
| Array | Shape | Meaning |
|---|---|---|
feats |
(N, 3, 13, 768) float16 | for the vocal clip, the instrumental clip and their mix: all 13 layers of music2vec-v1, averaged over time |
labels |
(N,) | 1 = good pairing, 0 = bad |
types |
(N,) | pair type, as above |
pair_ids |
(N,) | matches pair_id in the pairs files |
key_distance |
(N,) | −1 where not applicable |
Before mixing, both clips are normalised to −20 dB RMS, so level gives nothing away either.
Files named test_real-* are embeddings of a few privately held Afrobeats tracks used as an out-of-genre test. Their audio is not in this repository; a handful of analysis/own_*.json files describe them.
Loading
import glob, json, numpy as np
from huggingface_hub import snapshot_download
# enough to train a scorer: a few GB
root = snapshot_download("travis-moore/dj-scorer-data", repo_type="dataset",
allow_patterns=["embeddings/train-*", "embeddings/val-*"])
parts = [np.load(f) for f in sorted(glob.glob(f"{root}/embeddings/train-*.npz"))]
feats = np.concatenate([p["feats"] for p in parts]) # (N, 3, 13, 768)
labels = np.concatenate([p["labels"] for p in parts])
# one track's analysis
root = snapshot_download("travis-moore/dj-scorer-data", repo_type="dataset",
allow_patterns=["analysis/fma_000002.json"])
Licences
This repository now holds only measurements and features (beat times, keys, pair lists, encoder embeddings), not audio. The music they were computed from is in dj-music, where each track carries its own Creative Commons licence: almost all require attribution and about 85% are non-commercial only. If you regenerate stems, note that about 40% of the tracks are under no-derivatives licences.
Rights holders: to have anything removed, open a discussion in the Community tab and it will be taken down.
Limitations
- Labels are automatic, not human. "Another song's beat" is always counted as a bad pairing, even though some random pairings do sound good.
- Possible shortcut. Demucs leaves a trace of the instrumental inside the vocal stem. A model could learn to recognise a vocal's own beat from that trace instead of judging musical fit. The shifted and off-beat pair types are there to blunt this; it has not been ruled out.
- Separation quality varies. Heavy 808 bass, layered ad-libs and lo-fi masters separate less cleanly.
- Tempo and key are estimates and have not been checked against a reference. Double- and half-time tempo errors are expected in hip hop.
- Two key-detection settings. Roughly the first 2,700 tracks analysed used the whole track with automatic tuning estimation; the rest use the middle 90 seconds at standard tuning. Expect small differences in
key.confidencebetween the two groups. - One genre, one era. Independent hip hop, mostly pre-2017. There is no modern Afrobeats, amapiano or chart hip hop in the training splits.
- Artist imbalance. A few prolific artists account for many tracks. Splits are by track, not by artist, so an artist can appear in both train and test.
- Lyrics are unscreened and include explicit language.
Credit
Source audio: the FMA dataset (Defferrard, Benzi, Vandergheynst, Bresson, ISMIR 2017, arXiv:1612.01840). Separation: Demucs (Défossez et al.). Beat tracking: beat_this (Foscarin, Schlüter, Widmer). Encoder: m-a-p/music2vec-v1 (Li et al.). The music belongs to its artists.
- Downloads last month
- 104