feat: snap sample selection boundaries to deterministic nearby zero crossings

This commit is contained in:
Johannes Findeisen 2026-11-06 01:08:30 +01:00
commit edeeb8e8bb
8 changed files with 37 additions and 5 deletions

View file

@ -45,3 +45,7 @@ Gain / normalize processes only selected samples. Mode 0 accepts linear gain 0..
## Phase 77
Select audible bounds finds the first and last sample strictly above the chosen dBFS threshold and pads within the existing selection. It only changes selection; use Trim clip to selection to apply a nondestructive timeline trim, or export the selection. Entirely silent/below-threshold ranges leave selection unchanged. This is boundary detection, not automatic removal of internal gaps or a noise gate.
## Phase 78
Snap to zero crossings searches each selected boundary within a source-frame radius up to 65,536. It uses the mono source, chooses earlier positions on equal distance and changes both endpoints only if both searches yield a nonempty range. Source edges qualify only when their adjacent sample is zero. This can reduce boundary discontinuities but does not guarantee click-free output; musical-tick trimming/slicing can move a boundary away from the exact crossing.

View file

@ -1822,12 +1822,12 @@ Implemented: threshold-based audible-range detection with bounded padding and at
Find nearest bounded mono zero crossings around selection boundaries with deterministic ties; adjust selection without crossing or inventing samples.
### Tasks and acceptance criteria
- [ ] Implement bounded C99 analysis/processing and accessible FLTK controls.
- [ ] Preserve source files, atomic error handling, history and callback safety.
- [ ] Pass meaningful core and GUI checks; document exact behavior and limits.
- [x] Implement bounded C99 analysis/processing and accessible FLTK controls.
- [x] Preserve source files, atomic error handling, history and callback safety.
- [x] Pass meaningful core and GUI checks; document exact behavior and limits.
### Implementation status
Planned.
Implemented: deterministic nearest zero-sample/sign-crossing boundary search with bounded radius, earlier ties and atomic two-endpoint snapping. Core edge/radius/no-result/tie cases and GUI selection snapping pass.
---