-
feat(foundry): loop naming convention — engine/naming.py, derived from the corpus (#13) · 146070b5
Recovered the ParVagues loop naming scheme empirically from 1690 existing loops, rather than inventing one: NN_<role>[_<character>]. The corpus EDA that grounds it (reproducible via `naming.analyze_corpus`, parsers-over-copy): 46% carry a 2-digit NN_ index (the hand-cut-kit signature, vs keyed/tempo packs like 120g/80c), 74% underscore-joined, only 16% repeat the kit name (the folder already carries it), and the role tokens cluster on voice/vocals, keys, guitar, bass, brass, synth. naming.py provides: - suggest_name(index, role, character=, section=) → NN_role[_section][_character], slugged + zero-padded + de-duped against names already taken in the kit. - stem_of(role) → maps a role/character word back to its stem family, so a name stays honest to what was actually separated (never infer role FROM the name — the finder knows the stem; the name reflects it). - lint(name) → flags drift (no index, spaces, uppercase, odd chars). - analyze_corpus() → re-derives the stats above from the live Samples tree. Wired as export_take's default namer (replaces the inline f"{i:02d}_{name}"), so the GUI Forge button and CLI export both land convention-compliant names; the GUI's per-stem name field still overrides. CLI: python3 -m engine.naming --suggest 3 synth dark | --lint <name> | --analyze. 6 tests; full foundry suite green.PLN (Algolia) authored146070b5
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| test_engine.py | Loading commit data... | |
| test_grade.py | Loading commit data... | |
| test_loops.py | Loading commit data... | |
| test_naming.py | Loading commit data... |