feat: consolidate trimmed MIDI clips with explicit note boundary cropping

This commit is contained in:
Johannes Findeisen 2026-11-06 00:38:13 +01:00
commit fc76bf6803
9 changed files with 68 additions and 5 deletions

View file

@ -32,6 +32,11 @@ xtc_result xtc_project_duplicate_track(xtc_project *project,uint64_t track,const
* Hidden source notes remain editable. MIDI instruments may retrigger at the new
* clip boundary; the original sine preserves source phase. Atomic. */
xtc_result xtc_project_split_midi(xtc_project *project,uint64_t clip,uint64_t tick,uint64_t *out_right);
/* Consolidate >=2 MIDI clips on one track into a fresh clip spanning their
* bounding range. Copies only audible note intersections, crops at visible
* boundaries, drops hidden notes, retains overlaps and gaps. Fresh IDs; atomic.
* Cropped notes start anew; instrument envelopes/phase can change. */
xtc_result xtc_project_merge_midi(xtc_project *project,const uint64_t *ids,size_t count,uint64_t *out);
/* MIDI transforms affect ALL source notes in selected MIDI clips, including
* notes hidden by trims. Mixed audio/MIDI selections reject; IDs and unaffected
* fields persist. Initialize the edit struct to zero and set the fields for its