headroom — Built for the Rekordbox → CDJ workflow
🎚️">
GitHub
v2.0.0
What you prep in Rekordbox<br>is what plays on the deck.
Rekordbox's Auto Gain doesn't survive USB export, and Rekordbox has never offered compound Key+BPM playlist sort (Serato had it for years — but never exported to CDJs). headroom bakes both into the files themselves.
Get Started →<br>View on GitHub
Two gaps in the Rekordbox → CDJ workflow
Rekordbox prep doesn't fully reach the booth. Two software-only features get left behind on the way to the CDJ.
Gap 1 — Auto Gain doesn't survive USB export
Rekordbox's Auto Gain feature analyzes your tracks and calculates gain adjustments to normalize loudness. It works great with controllers.
But when you export to USB for CDJs, Auto Gain values are ignored.
Quiet tracks from smaller labels need +3~4dB trim boost
Old releases and CD rips are often much quieter
Constant trim adjustments mid-set break your flow
Risk of clipping if you forget to reset trim
Auto Gain on USB export
Rekordbox analyzes track → Auto Gain: +2.5dB
Export to USB
CDJ ignores Auto Gain value
Track plays too quiet → Manual trim adjustment
Gap 2 — Compound Key+BPM sort never existed
Harmonic mixing wants a playlist sorted by Camelot Key, then by BPM within each key group. Rekordbox's UI has never offered compound sort: its Sort by Key view is single-column, so BPMs scatter inside each key group.
Serato has had Shift-click multi-column sort for years — but Serato can't export to USB for standalone CDJs. The compound sort never reaches the booth.
Manual tag-hunting between tracks mid-set
Bucket playlists by key, then re-sort by BPM by hand
Even Rekordbox's Sort by Key view scatters BPM inside each key group
CDJs play in playlist order, so any in-software sort is invisible on the deck
Why the sort never reaches CDJ
Rekordbox: Sort by Key — BPM scattered
Rekordbox: Sort by BPM — Key scattered
No compound sort in Rekordbox UI
Even if there was — CDJs play in playlist order, not sort order
The Solution: Bake It In
Whether it's gain or playlist order — headroom takes the prep work Rekordbox does in software and writes it into something the CDJ will actually read: the audio file itself (for gain), or the playlist itself (for Key+BPM order).
headroom Workflow
headroom analyzes track → Headroom: +2.5dB
Gain baked into audio file
rbsort bakes Key+BPM into playlist
Export to USB (Rekordbox metadata preserved)
CDJ plays at correct level, in harmonic order
Same prep work — but where the CDJ can see it
The Loudness Normalizer measures True Peak and bakes safe gain directly into your audio files — the same analysis Rekordbox Auto Gain does, but with a permanent result. rbsort takes a Rekordbox playlist and bakes Camelot Key + BPM order into the playlist itself.
Analyzes LUFS and True Peak (same as Rekordbox)
Supports FLAC, AIFF, WAV, MP3, and AAC/M4A
Applies gain without limiting or compression
Preserves all Rekordbox metadata (cue points, hot cues, beat grids)
rbsort rewrites playlist order in collection.xml — originals stay intact
Terminal — v2.0.0
$ headroom
╭─────────────────────────────────────╮
│ headroom v2.0.0 │
│ Audio Loudness Analyzer & Gain │
╰─────────────────────────────────────╯
✓ Found 28 audio files
✓ Analyzed 28 files
● 3 lossless files (ffmpeg, precise gain)
Filename LUFS True Peak Target Gain
track01.flac -13.3 -3.2 dBTP -0.5 dBTP +2.7 dB
● 2 MP3 files (native lossless, 1.5 dB steps, requires TP ≤ -2.0 dBTP)
Filename LUFS True Peak Target Gain
track04.mp3 -14.0 -5.5 dBTP -0.5 dBTP +4.5 dB
● 2 AAC/M4A files (native lossless, 1.5 dB steps, requires TP ≤ -2.0 dBTP)
Filename LUFS True Peak Target Gain
track08.m4a -13.0 -4.0 dBTP -0.5 dBTP +3.0 dB
● 2 MP3 files (re-encode required for precise gain)
Filename LUFS True Peak Target Gain
track06.mp3 -12.0 -1.5 dBTP -0.5 dBTP +1.0 dB
● 1 AAC/M4A files (re-encode required)
Filename LUFS True Peak Target Gain
track10.m4a -12.5 -1.8 dBTP -0.5 dBTP +1.3 dB
? Apply lossless gain adjustment to 3 lossless + 2 MP3 + 2 AAC/M4A (lossless gain) files? [y/N] y
ℹ 2 MP3 + 1 AAC/M4A files have headroom but require re-encoding.
• Re-encoding causes minor quality loss (inaudible at 256kbps+)
• Original bitrate will be preserved
? Also process these files with re-encoding? [y/N] y
✓ Done! 10 files processed.
• 3 lossless files (ffmpeg)
• 2 MP3 files (native, lossless)
• 2 AAC/M4A files (native, lossless)
• 2 MP3 files (re-encoded)
• 1 AAC/M4A files (re-encoded)
Loudness Normalizer
Pillar one: bake gain into your audio files before USB export. headroom picks the optimal method per format and headroom amount, preserving original bitrate and Rekordbox metadata.
Smart format processing
FLAC / AIFF / WAV
Lossless<br>ffmpeg volume filter<br>Floating-point arbitrary precision<br>Target: −0.5 dBTP ceiling
MP3 / AAC / M4A
Headroom ≥ 1.5 dB?
Yes
Lossless Built-in<br>mp3rgain<br>Truly lossless global_gain<br>1.5 dB step...