Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
T
Tidal
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • PLN
  • Tidal
  • Repository

Switch branch/tag
  • Tidal
  • tools
  • sample-pack.py
Find file
BlameHistoryPermalink
  • PLN (Algolia)'s avatar
    add(tools): sample-pack.py — bundle a set's must-travel sample banks · fa7aef0b
    Answers: for a chosen set of tracks, which Dirt-Samples banks does it
    actually need, and can that be handed off over swisstransfer to play the
    set from a different laptop? Selectors: --tracks (explicit/bare names),
    --set NAME (armada/setlist_*.txt or a gig's tracks.json under
    ../../Web/www/content/lives/{year}/{slug}/, --set list to enumerate),
    --all (every .tidal under live/+copycat/, the default). Dry run by
    default; --pack DEST copies, --manifest-only writes just the manifest
    (the one meant to be committed, so a remote box can verify/reproduce
    the bundle without re-scanning).
    
    Reuses tools/setlist_samples.py (extract_names/build_index/resolve_track/
    read_setlist/bank_file_count) as the ONLY .tidal parser — no new regex
    over .tidal text. A second ad-hoc parser is the specific mistake this
    tool exists to avoid (a prior grep false-positived "gfunk" prose against
    the gfunk_* banks).
    
    THE MAPPED-ONLY FILTER: only banks actually mapped into the Dirt-Samples
    root travel (a real dir there, or a symlink into ~/Work/Sound/Samples).
    Classified as stock (tracked in the Dirt-Samples git checkout — ships
    free with a fresh install, excluded unless --include-stock), mapped
    (the symlink farm + local additions), extra (~/Work/Sound/Samples/extra),
    or unmapped (e.g. tidal-drum-machines, excluded unless --include-unmapped).
    The raw ~/Work/Sound/Samples tree (36 GB, mostly work-in-progress) is
    never walked directly — only through the same mapped index
    setlist_samples.py already resolves against, which is what keeps that
    36 GB out of the bundle.
    
    BANK-INDEX SAFETY: `s "bank:N"` indexes files in the order SuperDirt's
    pathMatch("*") glob returns them, which skips dotfiles. So packing copies
    EVERY non-dotfile in a bank (never subsets), follows symlinks to copy
    real content, and preserves the bank's directory name and file names
    exactly — dropping even one real file renumbers every index after it and
    changes what plays on the receiving machine. --force on a re-pack rmtrees
    the destination bank first rather than merging, for the same reason: a
    merge leaves stale files from a previous pack sitting next to fresh ones.
    
    Measured against --all today (714 .tidal files, live/+copycat/): 400
    banks resolve; 119 are stock (~166 MB) and excluded by default; 265
    mapped + 16 extra = 281 must travel, ~15.1 GB total. rhadamanthe_divers
    alone is a symlink to 314 files / ~4.3 GB, roughly 30% of the bundle.
    
    Tokens that resolve to no bank (--unresolved) are NOT reported as
    missing/broken: ParVagues' `#` is structure-left/values-right
    (`$ s "k" # s "jazz"` — k is a rhythm skeleton, jazz is what plays), so
    most unresolved tokens are structural placeholders or built-in SuperDirt
    synth names (superpiano, moogBass, supersaw...), never dropped samples.
    setlist_samples.py's own docstring treats the unresolved set the same
    way — as a non-error remainder, not an alarm channel.
    PLN (Algolia) authored Sep 06, 2026
    fa7aef0b
sample-pack.py 23.7 KB
EditWeb IDE
×

Replace sample-pack.py

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.