Commit 2c0718aa by PLN (Algolia)

docs(foundry): board — #21 landed, and the six discarded runs are the record

The Fred section now names every run that was thrown away and what found the fix,
because that list is the actual work: 161 samples (dead bars), 153 (rotation), 153
(24 of them digital silence graded A/B), aborted (staging root), 129 (silence
filtered at export only, so BIGHEN's tonal kit lost three loops instead of gaining
three real ones). Run 6 is the first where the finder itself refuses a silent window.

#21 moves to landed with its commands and its three honest gaps — the Strudel tab is
text-only, swing is in the engine but not the UI, and a rack cannot be saved as a
named preset.
parent 9b832eb5
......@@ -58,64 +58,65 @@ python3 kitgate.py /tmp/cut/fred_kits.json # then --link
## 🟡 In progress — finish the Fred pack (RESUME HERE)
The **3rd/final full run** was launched 17:32 (`pid 214097`, ~30 min, 9 parallel
children) writing to
`/tmp/claude-1000/-home-pln-Work-Sound-Tidal/51ee4fa8-7503-47a3-a4e5-cf19e930564b/scratchpad/final`
with log `…/final.log`. Runs 1 and 2 (161 and 153 samples) were DISCARDED — each
predated a fix. If that scratchpad is gone, just re-run the command above with
`--out <fresh dir>`; it takes ~30 min on 9 cores and is fully deterministic.
**Staging root is `~/Work/Sound/Samples/Fred/output/<kit>/`** (PLN asked for it there,
2026-08-21), passed as `--samples-root`; Dirt-Samples symlinks point into it.
Runs 1-5 were all discarded, each superseded by a fix found by looking at its output:
161 samples (pre-dead-bar-fix), 153 (pre-rotation-fix), 153 (**24 of them digital
silence graded A/B**), aborted (wrong staging root), 129 (silence filtered at export
only, so BIGHEN's tonal kit lost 3 loops instead of gaining 3 real ones). **Run 6** is
the first with the finder itself refusing silent windows.
```bash
cd tools/foundry
python3 -u -m engine.stempack "$HOME/Work/Sound/Samples/Fred/fred again stems" \
--no-link --samples-root "$HOME/Work/Sound/Samples/Fred/output" --out <fresh dir>
```
`--jobs` now defaults to half the cores (children run at nice 19 / SCHED_IDLE — PLN
works on this machine). Takes ~20-30 min, fully deterministic.
**Exact steps to finish, in order:**
1. `python3 restage.py --cuts <out>/fred_kits.json --dry-run` — expect **0 kits**
changed, because run 3 stages at export. Anything else means the export path
regressed.
2. `python3 kitgate.py <out>/fred_kits.json` — must be all-green on grade / kitcheck /
bank shadowing. `rights` is advisory and WILL warn (correctly) until step 3.
changed (export stages, and restage has a 0.05 dB dead band so it is idempotent).
2. `python3 kitgate.py <out>/fred_kits.json` — five checks, must be green on grade /
kitcheck / shadowing / `n` indices. `rights` is advisory and WILL warn until step 3.
3. `python3 ../../armada/tide-table/register_fred_rights.py <out>/fred_kits.json`
— registers every `fred_*` bank as `third_party` **with provenance**, so a per-track
release blocks by design. Do this BEFORE linking.
4. `python3 kitgate.py <out>/fred_kits.json --link` — the Dirt-Samples symlinks
(PLN asked for this explicitly). Then `python3 ../bank-check.py --since 1` to confirm
0 shadowed.
5. Copy `fred_kits.{json,md,tidal}` + `kitcheck.md` into
`tools/foundry/packs/fred/` and commit (see `packs/README.md` — manifest, not audio).
6. Report to PLN: per-kit tier histogram, distinct-sound count, the "worth a second
listen" table, and the paste-ready `n` indices.
**Expected shape** (from run 1/2, so approximate): ~40 kits, ~150 samples, ~9 tracks.
Tempo confidence gates one track (PLEASEMAKEITBETTER, 20%) to chops-only — correct.
MAREA is the ground truth: grid must read **123.0 bpm vs its declared 123**.
— every `fred_*` bank as `third_party` **with provenance**, so per-track release
blocks by design. Before linking.
4. `python3 kitgate.py <out>/fred_kits.json --link` (takes each kit's root from the
manifest), then `python3 ../bank-check.py --since 1` to confirm 0 shadowed.
5. `python3 kitindex.py --root "$HOME/Work/Sound/Samples/Fred/output" --root \
"$HOME/Work/Sound/Samples" --cuts <out>/fred_kits.json` — the index La Cale reads.
6. Copy `fred_kits.{json,md,tidal}` + `kitcheck.md` into `packs/fred/` and commit
(`packs/README.md` — manifest, not audio).
7. Report: per-kit tier histogram, distinct-sound count, the "worth a second listen"
table, and the paste-ready `n` indices.
**Ground truth:** MAREA declares `123BPM` in its filenames; the grid must read
**123.0**. PLEASEMAKEITBETTER reads 20% tempo confidence and correctly ships
chops only.
## 🟢 Landed (2026-08-21) — #21 La Cale, the kit auditioner
`armada/ui/kits.html` + `src/kits/` + `tools/foundry/kitindex.py`. Browse every kit
under the sample root (the 111 that predate the Foundry included), audition a sample
untouched or looped, rack several on one bar grid at a chosen tempo, export a
paste-ready `.tidal` block. The rack plays `rate = dur / (bars * barlen)` — literally
`loopAt` — so what you hear is what the rig does. 13 vitest cases on the export.
```bash
cd armada/ui && nvm use 22 && npm ci && npm run dev # /kits.html
python3 ../serve.py --dir dist --port 8792 # LAN / phone
cd ../../tools/foundry && python3 kitindex.py --all # regenerate the index
```
Open follow-ups, none blocking: the Strudel tab emits text only (no `@strudel/web` —
the deck already plays the rack and two audio graphs could disagree); the rack has no
swing control wired to the UI though the engine supports it; and `?kits=fred_*` narrows
the rail but there is no way to save a rack as a named preset.
## 🔴 Open
- [ ] **#21 — The kit auditioner SPA (asked for 2026-08-21): browse + loop + sequence.**
PLN: *"spawn a reusable SPA so i can listen to the samples, try each as a loop,
quickly sequence — could be a strudel playground, i'm open."* Design facts already
established, so this can start cold:
- **Where:** a new page in `armada/ui/` (Vite + React 19 + TS + Tailwind 4), which
ALREADY depends on `wavesurfer.js` + `@wavesurfer/react` and already ships
sibling pages this way (`bounds.html`, `judge.html`, `sextant`). Follow that
pattern; design language = the Ship's Bridge (`armada/DESIGN.md`), manage with
the `impeccable` skill from `armada/`.
- **Serving the audio:** add a `samples` prefix to `armada/ui/audio-mounts.json`
`/home/pln/Work/Sound/Samples`. That file is read by BOTH `vite.config.ts`
(dev) and `armada/serve.py` (prod), so `/audio/samples/<kit>/<file>.wav` works
identically in both. Same-origin, so no CORS work.
- **CANNOT be a published Artifact.** The Artifact CSP blocks external hosts and
the sandbox cannot reach a localhost audio server, so the page must be served by
`armada/serve.py`. Don't waste a session rediscovering this.
- **Sequencing = Strudel**, which is Tidal syntax in the browser, so a pattern
built there is nearly copy-pasteable into a `.tidal` file. `npm i @strudel/web`;
`initStrudel()`, then `evaluate("<pattern>")` / `hush()`. Load the kits with
`samples()` pointed at a generated `strudel.json` map — write a small generator
from `fred_kits.json` (it already carries kit, path, bars, bpm, tier, family,
stem_role, dur_s and CLAP tags, so the browser needs no analysis).
PLN's own research notes: `~/Downloads/Summarize how to integrate strudel js
music framew.md`.
- **The data is already browsable:** filter by track / family / tier, sort by
grade, show CLAP tags, and surface the report's "worth a second listen" rows.
- Suggested split: left = kit list, main = sample rows (waveform, tier badge,
bars@bpm, loop-toggle audition), bottom = Strudel pane with click-to-insert
(`s "fred_marea_drums" # n 3`). Confirm the layout with PLN before building deep.
- [ ] **#22 — Point stempack at the rest.** Same driver, no new code:
the 13 ACAPELLAS + 13 INSTRUMENTALS in `~/Work/Sound/Samples/Fred/` (already
44.1 kHz, so no resample; acapellas want chops mode), and the ~27 demucs catches in
......
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