9 Commits

Author SHA1 Message Date
c0dev0id
6be4a3297a Revert "Support both old and new sompyler AST slot names in parser"
This reverts commit b56d84befb890c13ad5daafa327032f9ca8c76e8.
2026-06-28 01:53:53 +02:00
c0dev0id
b56d84befb Support both old and new sompyler AST slot names in parser
Pre-c3b51bc sompyler emits offset.stem_note/motif.stem_note/clause.note
while new sompyler emits line.stem_note/seq.note. Parser now accepts both
parentSlot values for stem_note, motif, and clause children so the app
works against both old and updated sompyler installations.

Also falls back to reading chain.clause directly from stem_note's children
when no stem_note.chain node is present (old format had no chain wrapper).
2026-06-27 20:08:31 +02:00
c0dev0id
859e62e143 Adapt parser and tests to new sompyler AST slot names
Sompyler commit c3b51bc renamed slots across the board:
- offset.stem_note → line.stem_note (parentSlot 'offset' → 'line')
- motif.stem_note → line.stem_note (parentSlot 'motif' → 'line')
- clause.note/pause/stack → seq.note/pause/stack (parentSlot 'clause' → 'seq')
- stem_note.chain is now a real hierarchical node (depth 04) between
  line.stem_note and chain.clause; clauses are now its children, not
  direct children of stem_note

Also adds:
- offset.motifs[] for line.motif invocations at tick positions
- stem_note.writeToName from stem_note.write_to positional
- adjacent prop already stored; new tests verify True/False/absent

PaneFO.js: show offset motif invocations inline (label + chord)
test-parser.mjs: update synthetic fixtures to new depths/slot names;
  add tests for line.motif, stem_note.write_to, adjacent prop
2026-06-27 18:03:14 +02:00
c0dev0id
b887341df4 Add motif/stem_note display and offset note hierarchy
- parseAstLog: abort on depth jump >1 or missing slot (depth>0)
- buildStemNote: full clause tree (notes/pauses/stacks), editable fields
- buildClause: replaces buildCluster; filters nested clause.chain silently
- buildMotif: builds from voice.motif; sets isStatic
- buildOffset: uses buildStemNote; drops old clusters/chains arrays
- buildVoice: motifs are now objects, not label strings
- PaneSubObjects: static motifs before offsets; motif/offset→stem_note drill-down
- PaneFO: motif + stem_note FO cases; unknownProps display helper
- PaneCP: motif + stem_note shortView cases
- test-parser.mjs: 21 new synthetic tests for motif/clause/stack/guards
2026-06-27 16:14:56 +02:00
c0dev0id
097d4488ef Export metadata edits (title, composer, source, encrypter) via patchScore 2026-06-24 17:52:25 +02:00
c0dev0id
720a0b6b25 Add missing tests: AM, patchBarMeta, stressorToString, multi-variation, for_value, DEBUG skipping, serializeModulation edge cases 2026-06-24 16:56:45 +02:00
c0dev0id
89198ec37e Fix serializeModulation field names; add mod:base test assertion 2026-06-24 16:41:12 +02:00
c0dev0id
f318b155cc Fix VOLUMES/TIMBRE/FM placement: variation properties, not instrument-level
Per RFC §3.2.1.3, VOLUMES, TIMBRE and FM are variation properties. The
previous exporter incorrectly appended them to the first ATTR variation;
they now go into a synthetic root variation (no ATTR) as required.
variationLines() handles these fields directly.

Fix test-parser.mjs fixture paths for standalone execution from repo root.
2026-06-22 19:30:45 +02:00
c0dev0id
17f4529658 Add test-parser.mjs fixture-based compliance test suite 2026-06-22 15:48:23 +02:00