A Computational Analysis of Real-World DJ Mixes using Mix-To-Track Subsequence Alignment
Paper β’ 2008.10267 β’ Published β’ 1
A 5-stage audio analysis pipeline that reverse-engineers DJ sets into accurate tracklists with timestamps and transition analysis.
Repository: https://huggingface.co/rikhoffbauer2/dj-reproducer
This repository includes a Gradio app (app.py) for interactive use. To run it:
pip install -r requirements.txt
python app.py
Or deploy as a Hugging Face Space:
ffmpeg, libchromaprint-tools, libsndfile1| Stage | Purpose | Output |
|---|---|---|
| 1 | Fingerprint DJ set every ~30s, identify songs via AcoustID | stage1_fingerprints.json |
| 2 | Download identified songs from YouTube, confirm identity | downloads/ + stage2_confirmed.json |
| 3 | Align original songs with DJ set to find which part is used | stage3_alignments.json |
| 4 | Detect transitions (cue-out β cue-in) using DTW path analysis | stage4_transitions.json |
| 5 | Analyze transition techniques (cut, crossfade, EQ, etc.) | stage5_analysis.json |
| β | Generate final tracklist | tracklist_final.json + tracklist.txt |
# Clone repository
git clone https://huggingface.co/rikhoffbauer2/dj-reproducer
cd dj-reproducer
# System dependencies (Ubuntu/Debian)
sudo apt-get install -y libchromaprint-tools ffmpeg libsndfile1
# macOS
brew install chromaprint ffmpeg
# Python dependencies
pip install -r requirements.txt
python -m dj_reproducer.cli process \
--input "my_dj_set.mp3" \
--output-dir ./results \
--acoustid-key YOUR_ACOUSTID_KEY
python -m dj_reproducer.cli stage1 --input set.mp3 --acoustid-key KEY
python -m dj_reproducer.cli stage2 --tracklist results/stage1_tracklist_raw.json --acoustid-key KEY
python -m dj_reproducer.cli stage3 --input set.mp3 --confirmed results/stage2_confirmed.json
python -m dj_reproducer.cli stage4 --input set.mp3 --alignments results/stage3_alignments.json
python -m dj_reproducer.cli stage5 --input set.mp3 --transitions results/stage4_transitions.json --alignments results/stage3_alignments.json
python app.py
Then open http://localhost:7860 in your browser.
librosa.sequence.dtw(subseq=True)) on Β±30s windowEach stage reads/writes JSON files:
| File | Schema |
|---|---|
stage1_fingerprints.json |
{timestamp: {offset_seconds, duration_seconds, fingerprint, acoustid_results}} |
stage1_tracklist_raw.json |
{track_id: {title, artist, mbid, start_seconds, end_seconds, confidence}} |
stage2_confirmed.json |
{track_id: {title, artist, youtube_url, download_path, confirmed}} |
stage3_alignments.json |
{track_id: {offset_seconds, confidence, key_shift_semitones, beat_frames_mix, beat_frames_ref}} |
stage4_transitions.json |
[{track_id, title, artist, type: cue_out/cue_in, timestamp_seconds, diagonal_ratio}] |
stage5_analysis.json |
[{timestamp_seconds, outgoing_track, incoming_track, technique, confidence, ...}] |
tracklist_final.json |
{tracks: [{number, artist, title, start, end, start_seconds, end_seconds, key_shift, transition_technique}]} |
tracklist.txt |
Human-readable plain text tracklist |
dj_reproducer/
βββ __init__.py
βββ stage1_fingerprint.py # Windowed fpcalc + AcoustID lookup
βββ stage2_acquire.py # yt-dlp download + confirmation
βββ stage3_align.py # Beat-sync CENS chroma + subsequence DTW
βββ stage4_transitions.py # 32-beat rolling diagonal detection
βββ stage5_analyze.py # RMS/spectral comparison for technique classification
βββ cli.py # Orchestration CLI
app.py # Gradio UI
requirements.txt
README.md
MIT License β See repository for details.
This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.