A friend handed me a DVD-R of a 2011 radio residency: 23 two-hour shows, 1,400 song boundaries, all as one 6 KB cue sheet. The cue was valid text but the timestamps were off by a constant 1.8 seconds from track 4 onward, and three tracks had duplicate INDEX 01 lines. He had already imported it once into Traktor and the markers drifted visibly by the end of each show, so he wanted the cue fixed before re-importing.
I parsed the cue with a small script instead of trusting a converter. The core of it was: read each FILE block, collect every INDEX 01, sort by time, then compute deltas. The offset was constant per file, which told me it was an indexing bug, not tape drift.
import re
from pathlib import Path
TS = re.compile(r'^INDEX 01 (\d+):(\d+):(\d+)$')
def secs(m, s, f): return int(m)*60 + int(s) + int(f)/75.0
for line in Path('show07.cue').read_text().splitlines():
m = TS.match(line.strip())
if m:
print(secs(*m.groups()))
After sorting, I checked the first five deltas against the actual audio with a silence scan (ffmpeg silencedetect at -35 dB, 0.4 s min). The first three markers lined up; the fourth was 1.8 s late. I subtracted that constant from every marker after track 3, deduplicated the repeated INDEX 01s, and wrote a clean cue back out. Re-imported in Traktor: 1,400 markers, no visible drift.
Why not just re-detect every track? Because the shows had crossfades and crowd noise; a silence detector would have found 1,900 gaps, not 1,400 songs. The cue was the authoritative source of intent. The cost is that I trusted the human timestamps over the audio, and I had to manually verify the three duplicated markers by listening around them.
Where this breaks: if the offset is not constant, my approach fails. I checked a second show and the drift was 0.3 s, then 2.1 s, then 0.9 s, so I did not apply the same fix. Also, if the cue uses INDEX 00 (pregap), my sort collapses those into the wrong slot; I had to keep INDEX 00 separate and only renumber INDEX 01. I have also seen cue sheets where the FILE name contains a colon, and naive line splitting eats half the path.
My question: when a cue sheet is the only record of a set, do you trust its timestamps and repair them, or do you treat the audio as ground truth and rebuild markers from scratch?


0 条评论
还没有评论,写下第一条。