fix(metadata): teach gig-metadata both segment shapes, and refuse to guess
The OPAL tracks.json on the website still carried the pre-#148 tab-focus
boundaries, drifting up to 50 s from the measured cuts — and that file feeds
both the site and Slopmotion, so the visualist would have been cutting to
timecodes that no longer describe the audio.
Regenerating it should have been one command, except the two sides of the
pipeline describe a segment differently:
{name, start_s, end_s} what this tool was built for — keyed by .tidal stem
{title, start, end} what the mastering side produces (segments_v3.json)
Rather than add a converter script beside it, the tool now accepts both. One
parser per concept: "a segments file" is one idea and should have one reader,
not a reader plus a shim that can disagree with it.
The v3 shape is matched to the setlist BY TITLE, never by position. Position
would work today and silently pair the wrong boundary with the wrong track the
first time a soundcheck row or an unplayed track shifts the list — and this is
exactly the class of bug #148 already was. An unmatched title is therefore a
hard failure that prints both sides, not a warning.
That strictness paid for itself on the first run. Two titles failed to match:
"There's Something About Drums" vs "There's **Something About Drums** <3"
"Perfect" vs "Perfect <3"
backlog.md is prose written for a human, so names carry markdown emphasis and
hearts. The fold strips punctuation but KEEPS DIGITS — so `<3` survived as a
trailing `3` and `Perfect` folded to "perfect3", matching nothing. Stripping
`<3` before the alphanumeric fold is the fix, and the ordering of those two
steps is the whole bug.
Validated by diffing the regenerated file against the canonical one field by
field: names, order, bpmRange, styleDistribution and all 60 samplePacks are
byte-identical; only start/end/duration moved, on 13-15 of 15 tracks, plus
totalDuration_s 4809 -> 4769.1. Worst drift Perfect +50 s, then Gimme Acid +33 s
and Ghosts +32 s. venue and stage are passed through verbatim — omitting the
flags drops them, which the diff caught before anything was written.
Showing
Please
register
or
sign in
to comment