DJ USB T[ool]kit 0.5.0 optimization
Overview
DJ USB T[ool]kit is a local desktop app for preparing DJ USB sticks for CDJ/XDJ players. It needs no cloud connection and no user account. The 0.4.0 release post covered the Engine DJ library for Denon Prime and Numark Mixstream players and the plain-language diagnostics.
Version 0.5.0 is the latest release. Since 0.4.0 the main focus has been stability. The stick's databases are now built in only one way: the strict parity repair uses the same code as the export. Duplicate logic has been removed from the frontend, so decisions are made in one place, in the backend. The versions in between also fixed serious problems on older players, and those fixes are now tested on the CDJ-2000NXS and CDJ-2000NXS2.
There are new features too: you can now choose the stick's background colour in the app, import several playlists from rekordbox and Mixxx at once, select tracks to add them to playlists or edit them together, and the cue editor's waveform now works like rekordbox's.
New in 0.5
One way to build the databases
The "Upgrade Export Data To Strict Parity" repair used to have its own code for writing the databases. It rewrote both databases once per playlist and replaced every track's eDB values with a thin copy. On a large stick, the result was something neither the players nor rekordbox would load. Since 0.4.9 the repair reads both databases in full, merges them (a value on either side is kept) and writes each one once through the export's own writers. The PDB and eDB are therefore always built by the same code, whether by an export or a repair, and fixes to the export apply to the repair as well.
The repair saves both databases to the stick or neither. If saving fails, the stick stays as it was, without a repaired PDB next to the old eDB. The repair also reads the PDB once and writes it once at the end, instead of after every single fix. Unused code was removed from the backend, and duplicated helpers (PDB strings, page footers, atomic file writes and others) were merged. Exports and repairs produce the same bytes as before.
Decisions moved to the backend
The frontend used to make many decisions itself, and the same thing could be worked out differently in different places. Now the backend decides and the frontend shows the result:
- Source folders and their switches. The library list, Select all, the selection's length, adding to a playlist and analysis all read the same switches.
- Track rows. After analysis, a cue editor save or a details edit, the backend sends the track's whole updated row, and every list showing that track shows it the same way.
- What gets analyzed. Scan Library and Analyze Missing Tracks count the tracks to analyze the same way the analysis picks them. Before, Scan Library could skip analysis that imported tracks needed, or start one that had nothing to do.
- Player Menu edits. Add, Remove, Up and Down are applied by the backend directly to the menu on the stick. Before, the app sent a whole new menu built from what it had last loaded. An edit that changes nothing no longer makes a backup.
- Messages and counts. The counts in status messages come from the backend and read naturally: "1 track", "3 tracks", not "track(s)". Importing several rekordbox or Mixxx lists is one backend call.
The stick's background colour
The Player Menu editor now has a row of colours: Default, Pink, Red, Orange, Yellow, Green, Aqua, Blue and Purple, the same ones in the same order as in rekordbox. The colour shows as the highlight in the player's browse menu.
The colour is stored in both of the stick's databases: the PDB, which older players such as the CDJ-2000NXS2 read, and the eDB, which rekordbox and the CDJ-3000 read. rekordbox lets the two differ. When they do, the editor names both colours, and choosing a new colour sets both. Export and repair no longer change a colour that rekordbox set in the PDB alone.
A stick the app initializes now starts purple. rekordbox's own initialization uses the default colour.
The CDJ-2000NXS and CDJ-2000NXS2 show the colours correctly, and browsing the stick after a colour change works without a communication error.
Importing playlists from rekordbox and Mixxx
Import Playlists is now a checklist. Tick any number of playlists, crates and history sessions, from both libraries at once, and import them in one go. The first imported list opens when the import is done. If one list fails, the import carries on with the rest.
Selection, Add to… and editing in bulk
Every track list (Media Library, the app's playlists, USB playlists and USB history) has checkboxes, a select-all box and a selection bar next to the search:
- + Add to adds the selected tracks to the active playlist.
- Add to… adds them to several playlists at once. The list shows which playlists already hold all or part of the selection, and you can create a new playlist from it.
- Edit… sets the genre, release date and star rating of every selected track in one go. Each field shows the shared value or "Mixed", and only the fields you change are written. Edits from USB playlists and history are also written to the PDB and eDB on the stick.
- Reanalyze (Library and the app's playlists) analyzes the selected tracks again.
The bar shows how many tracks are selected and their total length.
The cue editor works like rekordbox
While a track is loaded, the playhead stays in the middle and the waveform scrolls under it. Dragging the waveform scrubs the track under the playhead, zooming keeps the playhead in the middle, and clicking the overview moves playback there. The waveform no longer shimmers while it scrolls, and zoomed out, the bar lines thin out so they don't cover the waveform.
The cue editor can now also edit a track's genre, star rating and release date, and a folder button opens the track's folder in the file manager. Adding a hot cue on a memory cue turns that memory cue into the hot cue, keeping its name and colour.
Will the playlist fit on the stick
Playlist and USB list headings show the total size of the audio files next to the track count. With a stick connected, the playlist's title row shows how many tracks and how much data an export would still copy and how much space the stick has, and warns when the list won't fit. Tracks already on the stick aren't counted, and working this out doesn't read the stick, so it stays quick on slow sticks too.
You can rename the stick by clicking its name in the header. A stick with the same volume label as a stick you already named asks for its own name instead of sharing the other stick's backups.
Older-player fixes tested on hardware
Two critical fixes in the 0.4.x versions concern older players:
- 0 tracks or a communication error. Older players could show 0 tracks on a stick the app had initialized, and after the first fix only one track, sometimes hanging with a communication error. Export now keeps the PDB's history page in the same state rekordbox does, and repair fixes sticks that are already affected. A comment or title longer than 126 characters also gave a communication error on the CDJ-2000NXS and NXS2 as soon as the track list opened. Such text is now written where the players read it.
- The strict parity repair on large sticks. A repaired stick that the players wouldn't load on 0.4.8 now loads (see "One way to build the databases" above).
Both are now tested on the CDJ-2000NXS and CDJ-2000NXS2: the stick loads, playlists open and tracks play. See the hardware test matrix.
Other changes since 0.4.0
- Artists for Engine DJ players (0.4.1). Denon Prime and Numark Mixstream players that import the PDB themselves showed many tracks without an artist. Export now writes artists the way rekordbox does, and Repair Artist Name Layout fixes sticks exported earlier.
- Each track gets its own analysis files (0.4.2). Export no longer writes two tracks' analysis into the same file, which could make a player show one track's waveform and beat grid for the other. Repair gives already shared files their own.
- Sidebar order and width (0.4.2). Playlists are reordered by dragging, and the sidebar can be made wider or narrower.
- Event Log to a file (0.4.3). The log is saved for the whole session to a file that "Open log file" opens.
- Search and the Year column (0.4.3). Search also finds the genre and release year, so "techno 2009" finds techno tracks from 2009.
- Source folders (0.4.4, critical, and 0.5.0). Removing a folder that sits inside another source folder no longer removes its tracks, with their cues and analysis, from the library. Nested source folders now show grouped under the outer folder, and the library no longer lists their tracks twice.
- Faster export on Linux (0.4.4). Closing files on a FAT stick can now overlap, so the export no longer waits for each one in turn. The
.deband.rpminstalls no longer close right away with an NVIDIA graphics card. - Fast diagnostics (0.4.9). Health & Diagnostics uses only the information in the databases, so it is fast even on a large stick and no longer sits on "Checking analysis references" for a long time.
- One export at a time (0.4.6). Double-clicking Export no longer starts a second export to the same stick.
- A faster library (0.4.7). Select all, scrolling and search are much faster in a large library.
- Missing analysis files (0.5.0). A playlist track whose analysis files had been deleted blocked the export, even though the playlist showed nothing to analyze. It now counts as unanalyzed, and Analyze Missing Tracks writes its files again. An edited or imported BPM, key and first beat are kept.
Status and availability
License: AGPL-3.0-or-later (MIT up to 0.1.x)
Availability: Public release (v0.5.0), open source
Platforms: Linux (deb/rpm/AppImage), macOS, Windows
Requirements: The prebuilt binaries don't need Node.js. Building from source or the optional essentia analysis engine does.
All changes: CHANGELOG