feat(audio): crossfade overlapping clips in one undoable edit (phase 98)

This commit is contained in:
Johannes Findeisen 2026-11-06 02:10:11 +01:00
commit 083ac05ae6
10 changed files with 82 additions and 6 deletions

View file

@ -71,3 +71,14 @@ are ignored. Each accepted tempo is an undoable edit and stops playback before
preparation; tapping is unavailable while recording. New/Open resets tap history.
The estimator uses monotonic control-thread time, with no audio-callback clock
access or allocation. Tap timing is not a beat detector or MIDI clock sync.
## Audio crossfades
Select two partially overlapping audio clips on the same track and choose
**Edit → Audio tools → Crossfade two selected clips**. The earlier clip fades
out across the overlap while the later clip fades in. Gains, positions, source
files and the opposite fades are preserved. Equal boundaries, containment,
adjacency, cross-track selections and MIDI clips reject without partial edits.
This is a linear tick-based crossfade using existing clip envelopes; it does
not move clips, create overlaps or offer equal-power curves. Discrete sample
endpoints retain the engine's existing one-sample boundary convention.

View file

@ -2178,12 +2178,12 @@ Implemented: transport Tap uses a bounded C99 four-interval estimator, 20–300
Apply matching linear boundary fades to two partially overlapping audio clips on one track, preserving source files and opposite fades. Reject ambiguous layouts transactionally and provide one undo step.
### Tasks and acceptance criteria
- [ ] Implement the workflow with bounded validation, safe preparation and documented limits.
- [ ] Pass meaningful core and/or GUI checks, including error and undo behavior.
- [ ] Document results and commit this phase separately.
- [x] Implement the workflow with bounded validation, safe preparation and documented limits.
- [x] Pass meaningful core and/or GUI checks, including error and undo behavior.
- [x] Document results and commit this phase separately.
### Implementation status
Planned.
Implemented: allocation-free C99 validation applies paired linear overlap fades atomically, retaining opposite fades, media, gains and positions. Ambiguous layouts reject. Exact overlapping-wave render and invalid-selection preservation checks passed, as did GUI two-clip crossfade/undo and warning-enabled builds.
---