-
fix(vox): DC-free clickless cuts + length-rigid bar-quantized loop variants · 4a74213c
Two defects surfaced while shipping the hammer (U Can't Touch This) vox kit extension — both fixed in the shared cut tail, now factored as _finish_clip(): 1. DC offset. Demucs vocal stems carry a small DC bias (measured −9.6e-5 stem-wide on the hammer catch); every cut inherits it and longer phrases tripped the grader's B2 dc-offset flag (|mean|>1e-4, 'break it down' cut measured −1.1e-4). Subtlety: a naive mean-subtract BEFORE fading is undone by the fades — the edge ramps remove signal asymmetrically and re-introduce up to ~1e-3 DC (caught by the new regression test, not by the real-data smoke run). Fix: subtract the FADE-WEIGHTED mean c = Σ(w·x)/Σw (w = fade envelope), then fade — post-fade mean is exactly 0 per channel AND edges are exactly 0. On-disk verify of the shipped hammer vox files reads dc = −0.0e+00, edge = 0.0e+00 across all six. 2. Loop-length drift. cut_phrase_loop placed the tail at exactly loop_beats × beat_s … then zc-snapped it (±12 ms), re-introducing the very grid deviation the length-preserving export rule (0759def5) forbids. The end snap is unnecessary — the fades already guarantee clickless edges — so the tail is now length-rigid: shipped 08_vox_stophammertime_loop is 4.00 beats to 0.02 ms at BPM 132.51. Tests: tightened test_cut_phrase_loop_is_exact_beat_multiple from 0.06-beat slack to <1 ms, added test_cut_removes_source_dc_offset (biased source ⇒ DC-free, unflagged cut). 82 passed.
PLN (Algolia) authored4a74213c
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| __init__.py | Loading commit data... | |
| autotune.py | Loading commit data... | |
| correlate.py | Loading commit data... | |
| demos.py | Loading commit data... | |
| fetch.py | Loading commit data... | |
| grade.py | Loading commit data... | |
| loops.py | Loading commit data... | |
| model.py | Loading commit data... | |
| naming.py | Loading commit data... | |
| publish.py | Loading commit data... | |
| separate.py | Loading commit data... | |
| vox.py | Loading commit data... |