djcues
Automated hot cue and memory cue placement for rekordbox, based on phrase analysis (PSSI), vocal detection (PVDI), and a standardized cue strategy.
djcues reads your rekordbox database, analyzes each track's phrase structure and vocal content, proposes cue placements following your cue system, and lets you review, adjust, and apply them back to the database.
Installation
Requires Python 3.10+ and uv.
git clone <repo-url> && cd dj
uv sync
Run commands with uv run djcues <command>, or activate the venv first:
source .venv/bin/activate
djcues <command>
Cue System
djcues uses a standardized 8 hot cue + 8 memory cue system defined in cue-system.csv:
| Pad | Hot Cue | Color | Memory Cue |
|---|---|---|---|
| A | First Beat | Green | First Beat |
| B | Loop In | Green | Loop In |
| C | Vocal / Buildup | Yellow | Before Buildup |
| D | Drop | Red | Before Drop |
| E | Breakdown | Blue | Before Breakdown |
| F | Special | Purple | Before Special |
| G | Outro | Cyan | Before Outro |
| H | Loop Out | Orange | Loop Out |
Memory cues 3-7 are placed a configurable number of bars before their corresponding hot cue (default: 16 bars). Memory cues 1, 2, and 8 share the same position as their hot cue. Colors are standardized per slot.
To customize the cue system, edit cue-system.csv and update the CUE_SYSTEM definition in src/djcues/constants.py.
Usage
Preview cues for a track
djcues propose "Playlist Name" "Track Name"
Visualize with waveform, phrases, and vocal detection
# Single track
djcues viz "Playlist Name" "Track Name"
# Entire playlist
djcues viz "Playlist Name" --all
# Compare proposals against existing cues
djcues viz "Playlist Name" "Track Name" --compare
Review and apply cues
# Launch interactive review in browser
djcues review "Playlist Name" --all
# Apply accepted cues to rekordbox (requires rekordbox to be closed)
djcues apply <session-file.json>
# Preview what would be written
djcues apply <session-file.json> --dry-run
In the review UI:
- Accept / Skip per track or use Accept All
- Click a cue marker to select it, then use arrow keys to nudge by 1 bar
- Press Delete to skip an individual cue
- Memory cues auto-recalculate when you adjust their hot cue
Compare accuracy against curated tracks
djcues compare "Processed" --all
How It Works
-
Phrase analysis (PSSI): rekordbox analyzes tracks into phrases (Intro, Up, Down, Chorus, Outro). djcues maps these to cue slots using heuristics — e.g., Drop aligns with the first Chorus after 20% of the track.
-
Vocal detection (PVDI): rekordbox's vocal detection data (stored in
.2EXANLZ files) provides per-frame vocal confidence. djcues uses the first strong vocal onset to place the Vocal/Buildup cue. -
Waveform (PWV5): The color waveform detail data is extracted and rendered in the HTML visualizer for visual reference.
-
Beat grid: All cue positions are snapped to the beat grid for precise alignment.
Safety
- Auto-backup:
djcues applyautomatically backs upmaster.dbbefore writing - Overwrite protection: Tracks with existing cues require explicit confirmation
- Rekordbox must be closed: The apply command will not write while rekordbox is running
- Read-only by default:
propose,compare,viz, andreviewnever modify the database - DB-only writes: Cues are written to
master.dbonly (not ANLZ files). rekordbox handles ANLZ sync on USB export.
Configuration
| Option | Default | Description |
|---|---|---|
--offset |
16 | Memory cue offset in bars before hot cue |
--loop-bars |
4 | Loop length in bars for Loop In / Loop Out |
Project Structure
src/djcues/
models.py # Data model (Track, CuePoint, Phrase, BeatGrid)
constants.py # PSSI mood tables, cue system definition, color maps
db.py # Rekordbox database reader
strategy.py # Cue placement heuristics
viz.py # HTML timeline visualizer
review.py # Interactive review HTML + session management
server.py # Local HTTP server for review sessions
writer.py # DB backup and cue writes
cli.py # Click CLI (propose, compare, viz, review, apply)
License
BSD 3-Clause. See LICENSE.
Colophon
Under the hood, djcues leverages pyrekordbox to interact with the Rekordbox database. It also makes extensive use of analysis files from Rekordbox. Other dependencies include click and pytest.
This project was created in fleeting free moments with the help of Claude Opus 4.6 and Superpowers.
Metadata
Release files for djcues 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| djcues-0.1.0.tar.gz | 594.5 kB | Without provenance | Details for djcues-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| djcues-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for djcues-0.1.0-py3-none-any.whl |
Total release size: 628.6 kB
Release files / djcues-0.1.0.tar.gz
| Download URL | djcues-0.1.0.tar.gz |
|---|---|
| Size | 594.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4e227d65a90c01463115aeb3e44e0d28a7bf006d425fb3d4bb81051a0df5865
|
|
BLAKE2b-256 checksum How to use checksums |
dfe6e4e05a0582833a659e0521b2abc2361025ccf5a245166197e84560f70ca3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.15
|
Release files / djcues-0.1.0-py3-none-any.whl
| Download URL | djcues-0.1.0-py3-none-any.whl |
|---|---|
| Size | 34.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0470452df7f71d69c169af7f87b0cae3dda1b38389a0a0371e9829bf68ae4dac
|
|
BLAKE2b-256 checksum How to use checksums |
8c59ccd515ee524556993d12efb9d3f3a465f3f3960642329a8faa5faada3685
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.15
|
Security for djcues 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.