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
  • take-segments.py
Find file
BlameHistoryPermalink
  • PLN (Algolia)'s avatar
    feat(take95): the album exports, and the split was 11 seconds out · d36b478b
    Master: 61.0 min, 2 ch, 48 kHz, 24-bit. I = -14.0 LUFS on the nose, peak
    -0.9 dBFS under a -1.0 ceiling, LRA 12.7 LU. L-R difference RMS is -22.4 dB, so
    it is genuinely stereo and not dual-mono — worth measuring rather than assuming,
    given the first attempt collapsed to one channel.
    
    THE BUG THAT WOULD HAVE SHIPPED. take-master trims leading silence before
    loudnorm sees it, so the master starts 10.94 s later in the music than the raw
    take does. The segments were computed against the RAW take. Splitting with
    unshifted offsets puts every boundary eleven seconds late — each track beginning
    eleven seconds into the previous one's tail. The output would have played
    perfectly and been wrong throughout.
    
    Two guards in take-segments:
      --shift   subtract the measured head trim. Clamped at 0, because the first
                track legitimately goes negative: PLN focuses a .tidal a few seconds
                BEFORE he evaluates it (log says 7.4 s, first sound is at 10.94 s).
      --master  probe the mastered file and clamp to its duration. The master is
                trimmed at the TAIL too (1.45 s), so without this the last segment
                ran past EOF and ffmpeg would have written a short final track in
                silence.
    Now: contiguous, starts at 0, sums to 3661.2 s — exactly the master's length.
    
    AND A SHADOWING BUG FOUND WHILE FIXING IT. The per-segment loop bound `start`
    and `end`, the same names as the take window, so the summary line printed the
    LAST SEGMENT as if it were the whole take: "1970-01-01 01:55 — 5.1 min". The
    segments were correct the whole time; only the report lied. That is the kind of
    defect that ships, because the payload looks right and nobody re-reads a header.
    
    GENERATIVE METADATA, per PLN's ask, derived not typed:
      title    backlog.md via setlist.py (the SSOT reaches the ID3 tag)
      TBPM     backlog BPM, NOT setcps — reference_tempo_from_audio, setcps is not
               felt tempo. gimme_acid is setcps 80 played as 160 half-time DnB, and
               you_my_sunshine is setcps 144 against a felt 166. Tagging 80 would
               have been a measured number that misleads.
      grouping the set section (Ouverture / SUNSET / NuJazz / NUIT)
      comment  orbit inventory from the .tidal via pvlint's parser, plus the source
               path, so any track can be traced back to the code that made it
    
    Metadata says REHEARSAL, not gig: album "OPAL 2026 — rehearsal, J-6", date
    2026-08-02, no venue, no lineup, no poster (feedback_metadata_vs_mastering — gig
    metadata is canonical only in Web/www/next/content/lives/).
    
    lime_tacos is track 7 at 1:49. He played it, then cut it from the set an hour
    later. The take records what happened, so it stays, tagged "not in the final
    set".
    
    Committed: segments.json, track_metadata.json, analysis.json — the provenance.
    Gitignored: the FLACs and MP3s, ~1.3 GB of derived audio regenerable from the
    Ardour stems in two commands.
    PLN (Algolia) authored Aug 02, 2026
    d36b478b
take-segments.py 10.4 KB
EditWeb IDE
×

Replace take-segments.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.