Commit Graph
3 Commits
Author SHA1 Message Date
aneurinandClaude Sonnet 5.5 3dd99bd1ed Let AddRegion clear inherited opcodes with an empty global header
When the headers above the end of the document set what a region's own
opcodes can't cancel, such as modulations or note_polyphony, AddRegion writes
an empty <global> before the new region, which clears the levels below it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 01:45:14 +00:00
aneurinandClaude Sonnet 5.5 8db34cc16c Check the text of structural edits and refuse stale instruments
AddRegion, RemoveRegion and MoveRegion now refuse an edit whose written text
would read differently from the nodes, as when a comment that never ends
takes in the text after it, and an instrument whose regions were changed
other than by Apply. Build refuses an unknown trigger and an empty random
range. Add tests for edits across files, defines, skipped regions and edge
cases, a random-sequence test and FuzzRegionEdits.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 01:26:36 +00:00
aneurinandClaude Sonnet 5.5 49fd867283 Add region lookup and structural edits, and reject regions Build can't write
Instrument.Source returns the flattened region and header behind a typed
region. AddRegion, RemoveRegion and MoveRegion edit the document and read
the instrument again, restoring the document if a region would read
differently. NewRegion returns a region with the format's defaults, and
Build refuses a region that can't be read back as it is.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 01:19:40 +00:00