Commit 565db062 by PLN (Algolia)

fix(finish): gate the global EDA on stem LENGTH, not existence — and report the A/B

The finisher decided whether to run the local-vs-global comparison by testing
whether the global drums stem exists. A soundfile writer creates its file the
instant it opens, so that test is true from the first second of an hour-long pass.
This is the same trap that had me reading "4 of 14 sections done" off a directory
count earlier tonight, and it would have been worse here than a wrong progress
number: the comparison seeks into the global stems by ABSOLUTE TIME, so a
truncated global file does not fail, it silently mis-aligns every later track and
returns plausible correlations for the wrong audio.

Now it probes the duration and requires ~3700 of 3779 seconds before attempting
the global half, falling back to the section-only EDA with the shortfall printed.
In practice the unit is ordered After= the demucs producer so the stems should be
complete anyway — but "should be" is exactly the assumption that a demucs failure
mid-global would have quietly violated, and the finisher runs unattended while PLN
sleeps.

Also made the summary report the air-shelf A/B explicitly, since that pair is the
thing he has to judge: both masters listed with size, sample rate, channels and
duration, and a loud MISSING line if either did not render. The EDA settled that
the 8-16 kHz deficit is cymbals rather than codec noise (drums hold 0.367% of
their own energy up there against 0.084% for the runner-up, a 4.4x concentration),
which licenses opening the shelf but says nothing about how far — so the summary
puts the two candidates side by side rather than announcing a winner.
parent 6411504d
......@@ -45,15 +45,42 @@ echo "--- split + verify ---"
"$PY" "$TT/render_release.py" "$SPEC" --only verify
echo
echo "--- stem EDA (needs the demucs unit to have finished) ---"
if [ -d "$ROOT/stems_demucs/global" ] && [ -f "$ROOT/stems_demucs/global/drums.wav" ]; then
echo "--- stem EDA ---"
# Gate on LENGTH, not existence. A soundfile writer creates the file the instant
# it opens, so `-f` is true from the first second of an hour-long pass — the same
# trap that made me misread "4 of 14 sections done" earlier tonight. The global
# comparison seeks into these by absolute time, so a truncated global stem would
# silently mis-align every later track rather than fail.
GDUR=0
if [ -f "$ROOT/stems_demucs/global/vocals.wav" ]; then
GDUR=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$ROOT/stems_demucs/global/vocals.wav" 2>/dev/null | cut -d. -f1)
GDUR=${GDUR:-0}
fi
if [ "$GDUR" -ge 3700 ]; then
echo "global stems complete (${GDUR}s) — full EDA with local-vs-global"
"$PY" "$TT/eda_stems.py" "$SPEC"
else
echo "global stems absent — running the section-only EDA"
echo "global stems incomplete (${GDUR}s of ~3779) — section-only EDA"
"$PY" "$TT/eda_stems.py" "$SPEC" --no-global
fi
echo
echo "--- the air-shelf A/B, for PLN's ears ---"
# The EDA proved the 8-16 kHz deficit is cymbals (drums 0.367% vs 0.084%
# runner-up, 4.4x), which licenses opening the shelf but cannot say how far.
for pair in "+5:$ROOT/Cosmic26_v1_streaming.flac" "+8:$ROOT/ab_air8/streaming.flac"; do
g=${pair%%:*}; f=${pair#*:}
if [ -f "$f" ]; then
printf 'air %s dB %s ' "$g" "$(du -h "$f" | cut -f1)"
ffprobe -v error -show_entries stream=sample_rate,channels \
-show_entries format=duration -of csv=p=0 "$f" | tr '\n' ' '
echo
else
echo "air $g dB MISSING ($f)"
fi
done
echo
echo "--- what is on disk now ---"
for v in streaming club; do
d="$ROOT/tracks_v1_$v"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment