Pulls a setlist (tracklist) for your DJ sessions by matching the WAV recording on your Engine DJ USB drive against the play history in Engine DJ's own database — and optionally uploads the session straight to SoundCloud and/or Mixcloud with the tracklist attached.
Engine DJ hardware (Denon/Engine OS) can record your set to a Sessions folder on the USB drive, and separately logs every track played to Engine Library/Database2/hm.db. This tool:
- Finds the mounted USB drive containing both the
Sessionsfolder andhm.db. - Reads the WAV file's creation time and duration to work out when the session started and ended.
- Queries
hm.dbfor every track played in that window and prints/uses it as a tracklist.
- Python 3.9+
- An Engine DJ USB drive mounted under
/Volumes(macOS) with aSessionsfolder andEngine Library/Database2/hm.db - A SoundCloud API app (client ID + secret) — only needed for SoundCloud uploads
- A Mixcloud API app (client ID + secret, with redirect URI
http://localhost:8765/callback) — only needed for Mixcloud uploads
python3 -m venv venv
source venv/bin/activate
pip install audioread requests python-dotenvIf you plan to upload to SoundCloud and/or Mixcloud, copy .env.example to .env and fill in your app credentials:
cp .env.example .envSC_CLIENT_ID=your_soundcloud_client_id
SC_CLIENT_SECRET=your_soundcloud_client_secret
MC_CLIENT_ID=your_mixcloud_client_id
MC_CLIENT_SECRET=your_mixcloud_client_secret
python3 main.pyPlug in your USB drive, run the script, and pick a session from the list (or a for all, q to quit). It prints the date, duration, and full tracklist for the session(s) you select.
python3 upload_sessions.pyThe first time you run this, mark your existing sessions as already handled so they aren't all uploaded at once:
python3 upload_sessions.py --setupAfter that, running upload_sessions.py will upload only new sessions (ones not yet recorded in uploaded_sessions.json), using the matched tracklist as the upload's description.
Useful flags:
| Flag | Description |
|---|---|
--privacy public|private |
Visibility for uploaded tracks (default: private) |
--dry-run |
List sessions that would be uploaded without uploading them |
--yes |
Skip the confirmation prompt |
--setup |
First-time setup — marks existing sessions as handled without uploading |
The first time you upload, a browser window opens for you to authorize the app with your SoundCloud account. Tokens are cached at ~/.soundcloud_tokens.json and refreshed automatically afterward.
python3 upload_sessions_mixcloud.pySame first-time setup step applies:
python3 upload_sessions_mixcloud.py --setupAfter that, running upload_sessions_mixcloud.py will upload only new sessions (ones not yet recorded in uploaded_sessions_mixcloud.json), with the matched tracklist sent as Mixcloud's structured per-track sections (artist, title, and timestamp within the mix) rather than a plain-text description.
Useful flags:
| Flag | Description |
|---|---|
--unlisted |
Upload as unlisted instead of public (requires Mixcloud Pro) |
--dry-run |
List sessions that would be uploaded without uploading them |
--yes |
Skip the confirmation prompt |
--setup |
First-time setup — marks existing sessions as handled without uploading |
The first time you upload, a browser window opens for you to authorize the app with your Mixcloud account. The token is cached at ~/.mixcloud_tokens.json.
main.py— finds the drive, matches WAV sessions to play history, prints setlistsupload_sessions.py— SoundCloud OAuth + upload, tracking uploaded sessions inuploaded_sessions.jsonupload_sessions_mixcloud.py— Mixcloud OAuth + upload, tracking uploaded sessions inuploaded_sessions_mixcloud.json.env.example— template for your SoundCloud and Mixcloud app credentials