feat: Traktor NML export#97
Open
Radexito wants to merge 14 commits into
Open
Conversation
4d8725b to
b24e505
Compare
- Add src/audio/nmlWriter.js — pure-JS NML writer (Traktor Pro 3 format)
* Encodes Traktor DIR paths (/:seg1/:seg2/: format)
* Maps Camelot keys to MUSICAL_KEY (0-23) and key text
* Writes COLLECTION entries with LOCATION, INFO, TEMPO, LOUDNESS,
MUSICAL_KEY, and AutoGrid CUE_V2 beat marker
* Writes PLAYLISTS section with $ROOT folder and named playlist nodes
- Add renderer/src/NmlExportModal.jsx + .css — export modal (idle →
exporting → done/error), mirrors ExportModal pattern
- Add IPC handlers export-nml and export-nml-all in src/main.js with
progress events; expose via src/preload.js
- Add context menu items in Sidebar: Export playlist as NML, Export all as NML
- Wire NmlExportModal in App.jsx
- Add 19 unit tests in src/__tests__/nmlWriter.test.js (all passing)
- Ignore *.so / *.so.* in .gitignore
Closes #28
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mirror M3U export behaviour: copy tracks to <outputDir>/music/ with friendly 'Artist - Title.ext' names and write LOCATION paths pointing to those copies instead of the internal hash-based storage paths. This makes the exported NML self-contained and importable on any machine.
After selecting files via the import dialog, show a modal that lets the user save them to a new or existing playlist (or skip). - New ImportPlaylistModal component with select + name input - Sidebar fetches playlists, shows modal before importing - On confirm: creates playlist if needed, imports files, then adds all track IDs to the chosen playlist in one batch call Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9344848 to
fb93266
Compare
Keep both Traktor NML and Rekordbox USB export features. Merge DownloadProvider/DownloadContext, TopBar, search, and always-mounted DownloadView from dev into this branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…port # Conflicts: # renderer/src/Sidebar.jsx
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
aaed4a3 to
7b7f689
Compare
Keeps NML export Sidebar props + NmlExportModal from HEAD while adopting dev's TidalDownloadProvider, always-mounted views, and analysis/waveform progress states. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Adds the ability to export the library and playlists as a Traktor NML collection file, importable directly into Traktor Pro. Closes #28.
Changes
src/audio/nmlWriter.js (new)
Pure-JS NML writer — no external dependencies.
- LOCATION (volume + encoded directory + filename)
- INFO (genre, key text, bitrate, playtime, rating, label, comment, import date)
- TEMPO (BPM with 6 decimal places, supports bpm_override)
- LOUDNESS (peak, perceived, and analyzed dB)
- MUSICAL_KEY (numeric value for Traktor's key display)
- CUE_V2 AutoGrid beat marker (uses intro_secs when available, defaults to 0 ms)
src/main.js
src/preload.js
renderer/src/NmlExportModal.jsx + .css (new)
Export modal following the same idle → exporting → done/error pattern as the existing Rekordbox export modal. Lets the user pick an output folder via the directory dialog; writes to collection.nml.
renderer/src/Sidebar.jsx
Added two context menu items after the existing M3U export entries:
renderer/src/App.jsx
Wired NmlExportModal and the two new sidebar handler props.
src/tests/nmlWriter.test.js (new)
19 unit tests covering: file creation, XML structure, COLLECTION entry count, LOCATION encoding, TEMPO/BPM, MUSICAL_KEY mapping, INFO genre, LOUDNESS, CUE_V2 beat marker, PLAYLISTS section, PRIMARYKEY references, XML escaping, optional field
handling, and multi-track output. All passing.
vitest.config.js
Added nmlWriter.test.js to the unit test project.
package.json
Added "*.js" pattern to lint-staged so root-level JS files (e.g. vitest.config.js, eslint.config.js) are auto-formatted on commit.
.gitignore
Added *.so / .so. to prevent system shared libraries from being tracked.