Phase 32: add MIDI track CLAP, VST2 and VST3 instruments

This commit is contained in:
Johannes Findeisen 2026-10-27 17:51:48 +01:00
commit fe484537f9
41 changed files with 1138 additions and 65 deletions

View file

@ -1,4 +1,4 @@
# Project format v11 (reads v1–v10)
# Project format v12 (reads v1–v11)
Phases 5–31 use a bounded text format implemented in C99 without a parser library.
The extension is `.xtc`. File operations run exclusively on the control thread.
@ -104,8 +104,8 @@ node types 1..4, migrating their clips to empty asset paths. Version 2 accepts
node types 1..5 and ASSET records. Both migrate to MIDI=0 and no notes.
Version 3 accepts instrument nodes and MIDI/NOTES records. Versions 1–3 migrate
all tracks to unity gain, centered pan, mute/solo off and no automation.
Saving always writes v11. Unknown versions are rejected without replacing the destination; older
applications without v11 support cannot read current saves. Migration and maximum-path roundtrips are tested.
Saving always writes v12. Unknown versions are rejected without replacing the destination; older
applications without v12 support cannot read current saves. Migration and maximum-path roundtrips are tested.
## Ownership and failures
@ -274,7 +274,7 @@ must rebuild and initialize the appended `xtc_automation_point.step` field.
## Phase 28 compatibility and diagnostic contract
The current reader accepts versions 1–11 and the writer always emits version 11.
The current reader accepts versions 1–12 and the writer always emits version 12.
Phase 28 made no format change; Phase 31 adds plugin format identity in v11. Saving an older document upgrades it;
retain an original backup if an older application must still open it. APP is
informational; compatibility depends on the format version, not the producer's
@ -367,3 +367,25 @@ publishing. Missing module metadata survives C load/save; GUI preparation retain
the existing document on failure. No automatic path search or plugin substitution
occurs. Current and historical migration fixtures, malformed fields, identity
mismatch, missing-module and exact-render roundtrips cover this extension.
## Phase 32: version 12 track instruments
After CONTROL_MAPS/MAP records and before END:
```
TRACK_INSTRUMENTS count
INSTRUMENT track_id format descriptor_index unique_id hex_label
MODULE hex_absolute_binary_path
IDENTITY hex_stable_id_or_dash
LIVE_INSTRUMENT track_id_or_18446744073709551615
END
```
Each binding comprises INSTRUMENT/MODULE/IDENTITY. Formats 1/2/3 mean
CLAP/VST2/VST3. Bindings require distinct existing non-bus tracks and compatible
instrument metadata (zero audio inputs). The live target must have a binding;
UINT64_MAX selects built-in sine. Empty bindings are valid. Older documents
migrate to no bindings and built-in live sine. Parsing/inspection never executes
modules; preparing playback verifies binary identity and configuration. Deleting
tracks removes bindings; reordering preserves stable track identities. Undo
snapshots include bindings. Public clients must rebuild for the new spec field.