Repository navigation
Move rekordbox's detail waveforms with the grid when converting a track - #15
Merged
Merged
Conversation
Library conversion moved the beat grid and cues by the encoder delay but left PWV3/PWV5/PWV7 where they were, so rekordbox's own waveforms sat a few ms off. Use the SDK's timeline_patches, which moves both.
There was a problem hiding this comment.
🟡 Changes recommended
The conversion test does not verify silent prefixes or preservation of PWV7’s original data, allowing nonzero padding or padding at the wrong end to pass.
1 open issue
What changed in this PR
Aligns rekordbox’s detail waveforms with the beat grid when audio conversion changes encoder delay, using the SDK’s timeline patching support.
Changes:
- Replaces local grid-only patching with SDK patches for the grid and detail waveforms.
- Updates delay documentation to include detail waveforms.
- Adds an ffmpeg-dependent WAV-to-MP3 integration test for grid movement and waveform alignment.
| File | Description |
|---|---|
native/crates/es-engine/tests/convert.rs |
Adds conversion coverage for grid offsets and detail waveform shifts. |
native/crates/es-engine/src/convert.rs |
Uses SDK timeline patches to shift detail waveforms alongside the grid. |
Review effort: Balanced
This was referenced Oct 27, 2026
Also moves the SDK to the timeline fix that empties a grid moved wholly before the start and leaves a malformed extended grid alone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Part 2 of the "convert audio on USB export" series. Depends on claw1200/es-rekordbox-sdk#2 (the submodule points at that branch; re-point after it merges).
When a track is converted to a format with a different encoder delay (e.g. WAV → MP3), the beat grid and cues already moved by the delay, but rekordbox's own detail waveforms (
PWV3,PWV5,PWV7) did not, so they sat ~20 ms off the audio and grid. The app's high-quality waveform is drawn from decoded audio, which hid this.convert.rsdrops its privategrid_patchesand uses the SDK'srb_anlz::write::timeline_patches, which moves the grid (same rule as before) and the detail waveforms by whole columns (150/s).PWAV,PWV2,PWV4,PWV6) are unchanged — the delay is far below one of their columns.Tests: new ffmpeg integration test converts an analysed WAV to MP3 and checks the grid moved by the measured delay and the colour and 3-band detail waveforms gained the matching silent columns at the start (skipped when ffmpeg is absent).