| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| engine | ||
| packs | ||
| research | ||
| tests | ||
| ui | ||
| .gitignore | ||
| PHASE2_LOOPFINDER.md | ||
| README.md | ||
| TODO.md | ||
| autotune.py | ||
| demos.json | ||
| foundry.py | ||
| kitgate.py | ||
| restage.py | ||
| server.py |
Chasing "does a shipped loop actually start on its downbeat" and nearly filing a false alarm on the way. First measurement said 17% — but it scored 16 slots with no full-band term while the rotator scores bars*4 slots WITH one, so the disagreement was the instrument's. Factored the scorer out (_downbeat_slot_scores) so the rotation and its verification cannot use lookalike measures, and re-measured with the real one. The bug is real and smaller than the first number: over 60 shipped bar-loops, slot 0 was the best slot in 29 and in the WORSE HALF of slots in 10. Median miss was 0.032 — i.e. usually a near-tie — but one loop in six genuinely opens on a weak beat, which is exactly the "timed ok but cut BCDA/DABC" complaint from 2026-07-11 that this function was written to fix. Mechanism: the roll point is zero-crossing snapped by up to ~10 ms against a 20 ms attack window, and between two near-tied slots that is enough to flip which one wins. On clean synthetic material rotation is idempotent (pass 1 finds slot 4, pass 2 finds 0); on real music the tie-breaking is fragile. So it now checks its own result and repeats, up to 3 passes, keeping a pass only if the measured miss improves. Safe because rotation is free: two rolls compose into one and the guard cannot oscillate. Best slot 29 -> 46 of 60, worse half 10 -> 1, median miss 0.032 -> 0.000. Default is 3 rather than opt-in: it is strictly better and applies to every caller, including export_take, so the GUI's forge gets it too. 112 tests.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| engine | Loading commit data... | |
| packs | Loading commit data... | |
| research | Loading commit data... | |
| tests | Loading commit data... | |
| ui | Loading commit data... | |
| .gitignore | Loading commit data... | |
| PHASE2_LOOPFINDER.md | Loading commit data... | |
| README.md | Loading commit data... | |
| TODO.md | Loading commit data... | |
| autotune.py | Loading commit data... | |
| demos.json | Loading commit data... | |
| foundry.py | Loading commit data... | |
| kitgate.py | Loading commit data... | |
| restage.py | Loading commit data... | |
| server.py | Loading commit data... |