feat: export sample ranges and adopt new source copies with rollback and project undo

This commit is contained in:
Johannes Findeisen 2026-11-06 01:03:31 +01:00
commit 342a93385c
10 changed files with 62 additions and 4 deletions

View file

@ -17,3 +17,7 @@ opens the piano roll. This editor does not audition or stream long files.
## Phase 70
Trim clip to selection applies source-frame endpoints within the current audible clip. Start rounds up and end rounds down to musical ticks; empty sub-tick ranges reject. Leading removal moves the timeline start by the same amount, preserving alignment. Source content, reference and clip gain/fade settings remain intact; project Undo restores the prior trim.
## Phase 71
Export selected frames writes a new mono float32 WAV of the half-open selection at native rate. Save full copy and relink writes the complete source and relinks only the selected clip after successful preparation. The original source is never overwritten. Full-copy adoption requires matching source frame count/rate. Project undo restores the reference but retains the new file, which may be referenced by redo/history or other projects. Failed adoption removes its owned new file. Export/copy runs synchronously outside audio callbacks.

View file

@ -1717,12 +1717,12 @@ Implemented: native frame bounds trim audio inside its current audible region wi
Export selected frames or save the complete edited source into a new mono float32 WAV; optionally relink the selected clip with project undo and cleanup on failed preparation. Never overwrite source/destination files.
### 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: no-clobber mono float32 selection export and full-source copy adoption, preserving frame/rate alignment. Preparation failures remove the newly written copy and retain the original project; successful adoption is project-undoable. Exact exported frames, existing destination protection and GUI failed/successful adoption/undo pass.
---