Repository navigation
expressport: generate the analysis files, for libraries rekordbox has never analysed #147
Description
Activity
- addedenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
on Sep 22, 2026 Implemented in #148, opt-in behind
--generate-analysisexactly as scoped above: copying stays the default whenever a rekordbox analysis exists, generation only fills the gaps, and the hashed directory,export.pdband the stick layout are untouched.What the measurement side turned up, since the open questions in the body were mostly about that. The corpus was 1070 tracks of a rekordbox 7.2 library with both the analysis files and the audio at hand.
- Which sections a player gets: everything rekordbox 7 writes except
PSSI, in rekordbox's order, with the same header words.PVB2is never written (FLAC seek table, not needed). - The monochrome pair is exact.
PWV3height isfloor(31.5 * (column peak / track peak)^2)over the mono mix at 150 columns per second, and the whiteness is7 - floor(8 * lowpassed peak / peak)with a 150 Hz second-order low-pass. Both reproduce rekordbox on 99.5% or more of the columns.PWAVandPWV2are RMS-based approximations; rekordbox's ownPWAVis not a function of any column statistic I could find. - The colour waveforms are approximations, as expected. The three-band bytes are low, mid, high in that order (rekordcrate has it right, the Deep Symmetry doc does not), from second-order crossovers at about 300 Hz and 2.5 kHz with a per-column peak and release; correlation with rekordbox 0.99 / 0.98 / 0.90.
PWV5colours map r = low, g = mid, b = high.PWVCcarries a per-track gain in the range rekordbox uses. PQTZis expanded fromTEMPOwith rekordbox's rounding (91% of 328 fixture tracks within 1 ms; the remainder is BPM precision the XML rounds to 0.01).PQT2is written in the empty form rekordbox itself uses on some tracks, because its per-beat body resisted decoding.PSSIis omitted. Whether a player minds is the first hardware question, together with the emptyPQT2and whether the colour waveform shows without a re-analysis delay. Both go to Player reports for baken expressport (out of beta since 4.3.0; CDJ-3000 and CDJ-2000NXS2 confirmed) #116 once a stick written this way has been in a player.
Still blocked behind #116 for the "ship as default" question, but the code path exists, so a tester with a CDJ can now try a library rekordbox has never seen (#145) and report.
- Which sections a player gets: everything rekordbox 7 writes except
Implemented in #148 and closing with it.
--generate-analysisis opt-in, copying stays the default when a rekordbox analysis exists, and the measured rules are recorded in the module docs and in the PR description.The questions that only a player can answer (an
.EXTwith noPSSIand an emptyPQT2, and whether the colour waveform is drawn without a re-analysis delay) are now step 2 of the test list in #116. Nothing further is planned here unless a hardware report says the generated files are refused; if so, reopen with the files the player wrote to the stick.- added a commit that references this issue
on Sep 22, 2026
Part of #115, and the one thing left in it that
expressportdeliberately does not do. Split out because #145 is the first real request for it, and because the answer "rekordbox has to have analysed the track" now needs an issue number behind it rather than a line in a design document.Why
expressportbuilds the stick from two sources. Everything textual comes fromcollection.xml, and the waveforms come from rekordbox's own.DAT/.EXT/.2EX, copied out of the local analysis cache with onlyPPTH, the cue sections and thePSSImask rewritten. That was the right call for the beta: rekordbox's analyser is the reference, and copying it is exact by construction.It also means
expressportcannot write a stick for a library rekordbox has never seen. In #145 that is a Mixxx library converted tocollection.xmlwith mixxx2rekordbox, on Ubuntu, where rekordbox does not even run. The grid and the cues were all there in the XML. Only the waveforms were missing, and there is nothing to point--anlz-dirat.Generating them ourselves is also what #72 asks for from the other direction: once analysis files can be produced from audio plus an XML, a Traktor or Mixxx library becomes a first-class source and
bakenstops being a rekordbox accessory for that workflow.What is already there
More than half of a generated file is code that exists:
PPTHsection::set_pathPQTZ/PQT2TEMPO, expanded per beat with the beat-in-bar numberinglocate::pqtz_summary); needs a writerPCOB/PCPT,PCO2/PCP2POSITION_MARKanlz::cues, byte-verified against a real exportPVBRrewrite::set_cbr_pvbr,rewrite::mp3_audio_framesPSSIDecoding is not a new dependency either:
baken-corealready decodes with symphonia for the BS.1770 measurement (#129), so the same reader can feed a waveform builder.What has to be worked out
PWAVandPWV2in the.DAT,PWV3,PWV4andPWV5in the.EXT, and the three-band set (PWV6,PWV7,PWVC) that arrived with the CDJ-3000.expressportcopies all of them today without parsing any, so the inventory has to be confirmed against the local fixture export first, per file type and per rekordbox version.PWAVis a fixed-size preview andPWV3a scrolling detail, both height plus a whiteness-ish byte per column. Getting the column rate and the scaling right is fiddly but bounded.PWV4andPWV5encode a per-column split into frequency bands, and the three-band CDJ-3000 sections encode another. That means a filterbank and a mapping into the packed representation, and neither is documented as a formula, only as a layout.PSSIcannot be generated. Phrase detection is rekordbox's, and there is no way to infer it. A generated file would omit the section entirely, which is a question for the hardware, not for us: a player that refuses a track without phrase data, or hides the phrase display, or does not care, all change what this feature is worth.Scope
generatemodule next torewrite, producing wholeAnlzFilevalues rather than editing parsed ones.--generate-analysis, off by default, refusing to run silently for tracks that do have a rekordbox analysis. Copying stays the default whenever a real analysis exists, because it is exact and generating is an approximation.export.pdb, the hashed ANLZ directory or the stick layout. Those are solved.Tests
expressport: the second run writes the same bytes.Hardware, and the order of things
This is blocked behind #116. Nothing should be generated for a real stick until a player has read a stick
bakenwrote from copied analysis, because otherwise a failure has two possible causes and no way to tell them apart. Once #116 comes back, the go/no-go for this one is its own short list: does the track load, is the grid on the beat, is the waveform there and is it the colour one, is there a re-analysis delay, and does the phrase display behave with noPSSI.Until then #145 and #72 both have the same answer: prepare the library in rekordbox once, or use the VM route in #145.