-
fix(preload): the eager-preload existed — it just disabled the safety net it replaced · b4f62757
THE SILENT ORBITS WERE A TWO-PART INTERACTION, AND PART TWO WAS OURS. Symptom, for two evenings: orbits went silent mid-set. Which ones changed every boot. The boot log looked perfect — every bank registered with the right file count — and 19741 `Buffer UGen: no buffer data` messages piled up in a single 6h session where no performer would ever see them. Part one is upstream design. `~dirt.doNotReadYet = true` registers banks from WAV HEADERS ONLY; the audio is read on first use. That read is fired asynchronously by `readFileIfNecessary` (DirtSoundLibrary.sc:268-274), which returns immediately — so the synth for the very event that triggered the read gets a bufnum with no samples in it. A correct file count in the log proves nothing about playability, because the count comes from the header. Part two is ours, and it is the one that turned a first-hit glitch into a dead orbit. `preload.scd` — our own generated warm-up — set `~dirt.doNotReadYet = false` and NEVER SET IT BACK. `readFileIfNecessary` has exactly one caller, and that call site is gated on `doNotReadYet` (DirtSoundLibrary.sc:259-261). With the flag left false, a bank registered header-only at boot is never read. Not read late: never. So every bank the whitelist happened to MISS was permanently silent, forever. And the whitelist missed banks routinely, because gig-up.sh built it from the N most-recently-EDITED tracks (`--last`). That is a guess about what will be played. the_revolution_will_be_sampled had not been edited recently, so `like_sugar` and `the_revolution` were never warmed — which is precisely the set of banks feeding the six orbits that were dead. Whitelist-by-mtime also explains the symptom that made this look haunted: the misses changed as files were touched, so a different set of orbits died on each boot. Neither half is fatal alone. A miss with the flag restored is a slow first hit; a flipped flag with a complete whitelist is invisible. Together they are a silent-orbit generator. THE FIX, in the generator that emits preload.scd: - Restore `doNotReadYet = true` after warming. This is the load-bearing line: it demotes the whitelist from load-bearing to a mere optimisation, which is the only thing it is safe to be on stage. - Drive the whitelist from an explicit setlist file (setlist_opal2026.txt) rather than from mtimes. Warm what will be PLAYED. `--last` stays for jamming. - Emit a per-bank COUNT ASSERTION. Re-loading a bank REPLACES it (addBuffer defaults appendToExisting = false, DirtSoundLibrary.sc:42-46), so this is index-stable and `like_sugar:21` keeps its meaning; the assertion guards the one case that would break that, a whitelist gone stale against the folders. - gig-up.sh writes via a temp file, because `> preload.scd` truncates BEFORE the generator runs — a failure used to leave an empty preload the boot read as "nothing to warm". The assertion earned its keep on its first run, failing `jbk_kick: expected 508, got 254`. Exactly 2x, and the tool was wrong, not the rig: that folder symlinks into the rhadamanthe pack, which carries an AppleDouble `._X.wav` beside every real `X.wav`. `glob('*.wav')` matches both; SuperDirt's `pathMatch("*")` skips dotfiles; `ls` hides them so the folder looks clean. Counting now skips dotfiles. VALIDATION — instrumental, no ears (PLN at work), two timepoints, per the rule that short windows make a time-varying fault look static: BEFORE: the_revolution_will_be_sampled, d4/d5/d9/d10/d11/d12 all -inf at source. AFTER : all 11 declared orbits carry signal, and STILL carry it on a second probe ~95s later with no re-eval (levels stable to ~0.2 dB). no buffer data since the eval: 0 (was 19741 in 6h) Preload: 47/47 banks pass the count assertion, 2352 files, 2.2 s, 1.2 GB. Also fully green: perfect 12/12 orbits, gimme_acid 10/10, mafia_sans_serif 7/7, wap 5/5. Bare `s "like_sugar*4"` / `"the_revolution*2"` with no helpers: audible. STILL BROKEN, SEPARATELY: vague_de_crime is silent at source with ZERO buffer errors, and every one of its dead orbits routes through the ^NN helpers (gMute2/gM1/gM3/gF1/gF3). That is #61 — an untouched `^NN` evaluates to `silence`, not 0 — not this bug. Fixing the buffers removed the noise that was hiding it. Refs #26, #63. Surfaces #61. Note for #44: the readiness gate passes BEFORE the preload finishes, since "listening to Tidal" is printed by ~dirt.start well ahead of the warm-up.PLN (Algolia) authoredb4f62757
×