feat: split MIDI clips nondestructively with source-relative note slices

This commit is contained in:
Johannes Findeisen 2026-11-06 00:36:04 +01:00
commit 3c202cbfdc
8 changed files with 51 additions and 9 deletions

View file

@ -27,6 +27,11 @@ xtc_result xtc_project_ripple_time(xtc_project *project,uint64_t begin,uint64_t
* instrument settings, mix, bus route and mixer automation; inserts adjacent to
* source. Shared modular graph and live-input target are unchanged. Atomic. */
xtc_result xtc_project_duplicate_track(xtc_project *project,uint64_t track,const char *name,uint64_t *out);
/* MIDI split strictly inside the visible clip. Keeps left ID; right gets fresh
* clip/note IDs and copied complete source notes with an adjusted source offset.
* 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);
/* 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