Commit aa41686a by PLN (Algolia)

perf(rig): lookahead 0.2->0.1 total, opt-in BT rfkill for gig nights

s.latency 0.1 (oLatency 0.1 on top = 0.2 total; the old padding defended
against watchdog-restart bursts, not latency). Regression check in-file:
journal late-count must stay 0, revert on any late. gig-up --bt-off/--bt-on:
a phone or BLE lamp churning wireplumber can kill the fold links — rfkill
the radio before doors.
parent 9507ad6a
......@@ -417,14 +417,15 @@ StageLimiter.activate; // BatLib safety limiter on master out
// 0.2 is SuperCollider's own documented default. Going lower is fair game — the
// floor is whatever keeps `late` at zero under the densest thing PLN plays.
//
// HOW TO KNOW IF IT IS TOO LOW, now that it is countable:
// journalctl --user -u parvagues-sc -b --no-pager | grep -cE '\blate [0-9]'
// Zero is the target. `tools/latency-lens.py` reports it per candidate too.
// Match `late <digits>` and not the bare word: `late` is a substring of
// ordinary text and a loose grep scored six hits on `metalPlate.scd`.
// 2026-09-21: down to 0.1 (from 0.2). With the watchdog bug fixed the padding's
// original justification is gone, and Tidal adds its own oLatency 0.1 on top
// (BootTidal.hs, untouched), so total lookahead is 0.2 — the old SC-side number.
//
// Tidal adds its own oLatency per target on top (BootTidal.hs: 0.1 for
// SuperDirt, 0.02 for the visuals target), so the total lookahead is the sum —
// do not tune one while forgetting the other.
s.latency = 0.2;
// REGRESSION CHECK (must hold from the next parvagues-sc restart):
// journalctl --user -u parvagues-sc -b | grep -cE '\blate [0-9]'
// Zero is the target; on ANY `late`, revert to 0.2. `tools/latency-lens.py`
// reports it per candidate too. Match `late <digits>` and not the bare word:
// `late` is a substring of ordinary text and a loose grep scored six hits on
// `metalPlate.scd`.
s.latency = 0.1;
);
......@@ -49,6 +49,10 @@
# tools/gig-up.sh --live # + assert a RIG exists, not just a set
# tools/gig-up.sh --converge # + START what is missing, then assert (implies --live)
# tools/gig-up.sh --quiet # only the verdict and any failures
# tools/gig-up.sh --bt-off # + rfkill block bluetooth (paired phones/BLE lamps
# # restarting the wireplumber session manager can
# # kill all audio — the fold links die)
# tools/gig-up.sh --bt-on # + rfkill unblock bluetooth (undo --bt-off)
#
# Exit 0 = GO. Non-zero = do not start; the reasons are printed first.
set -u
......@@ -77,12 +81,15 @@ AUDIO=0
QUIET=0
LIVE=0
CONVERGE=0
BT=""
for a in "$@"; do
case "$a" in
--audio) AUDIO=1 ;;
--live) LIVE=1 ;;
--converge) CONVERGE=1; LIVE=1 ;;
--quiet|-q) QUIET=1 ;;
--bt-off) BT=block ;;
--bt-on) BT=unblock ;;
-h|--help) sed -n '2,58p' "${BASH_SOURCE[0]}" | sed 's/^# \?//'; exit 0 ;;
*) echo "gig-up: unknown option $a (try --help)" >&2; exit 2 ;;
esac
......@@ -91,6 +98,19 @@ done
if [ -t 1 ]; then R=$'\033[31m'; G=$'\033[32m'; Y=$'\033[33m'; D=$'\033[2m'; Z=$'\033[0m'
else R=; G=; Y=; D=; Z=; fi
# BT hardening, opt-in. A paired phone or BLE lamp restarting the wireplumber
# session manager can kill all audio (the gig-up --headphones fold links die),
# so before doors: rfkill the radio off entirely. Default (no --bt-* flag)
# leaves bluetooth untouched.
if [ -n "$BT" ]; then
if rfkill "$BT" bluetooth 2>&1; then
(( QUIET )) || echo " ${G}+${Z} bluetooth $BT-ed"
else
echo " ${R}!${Z} rfkill $BT bluetooth failed (root needed? rfkill present?)" >&2
exit 2
fi
fi
LOG="$(mktemp -t gig-up-XXXXXX.log)"
FAILURES=() # one "name|fix command" per blocking failure, printed FIRST at the end
WARNINGS=()
......
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