-
fix(foundry): the periodicity check was measuring loop length, then role · 0c140b17
Two errors stacked in one metric, both found by looking at its distribution instead of its verdicts. **It penalised short loops for being short.** Autocorrelation at lag k has only N-k overlapping frames, but the score was normalised by ac[0], which sums all N — so the number was partly a function of how much of the loop the lag consumed, and a 1-bar lag consumes half a 2-bar loop against an eighth of an 8-bar one. On a perfectly periodic click track the biased estimator reports 0.418 / 0.623 / 0.754 at 2 / 4 / 8 bars for IDENTICAL material. Dividing by the per-lag overlap count first: 0.834 / 0.830 / 0.862, flat as it must be. Corpus medians moved 0.12 -> 0.24 (2 bar), 0.31 -> 0.41, 0.43 -> 0.49. **And then it asked every role the same question.** Split by family across 81 bar-loops: drums 0.754, fx 0.549, tonal 0.214, bass 0.173, vox 0.087 — an 8.7x spread end to end. A drum loop that does not repeat at the bar is broken. A sung phrase that does not repeat within itself is a sung phrase, and a held chord is a perfectly good loop with no onset period at all. One threshold across all of them condemned 12 of 20 vocal loops for the crime of being vocal. Floors are now per family, and vox is measured-but-never-flagged. Also: dead bars are now rejected at EXPORT rather than reported afterwards. A 4-bar loop whose last two bars are a fade grades S — silent-to-silent is a perfect seam and the length is still an exact bar multiple — and 10 of the first 161 cuts were exactly that. An objective defect with an objective test belongs in the gate, not in a report someone has to read. First full run for the record: 161 samples, 43 kits, ZERO bar-length errors and 161 of 161 distinct sounds, so the bar-multiple guarantee and the export dedup both hold at scale. 21 tests in this file, 104 in the suite.
PLN (Algolia) authored0c140b17
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| test_autotune.py | Loading commit data... | |
| test_correlate.py | Loading commit data... | |
| test_engine.py | Loading commit data... | |
| test_grade.py | Loading commit data... | |
| test_loops.py | Loading commit data... | |
| test_naming.py | Loading commit data... | |
| test_stempack.py | Loading commit data... | |
| test_vox.py | Loading commit data... |