Skip to content

Quiet gap logging, interpret plugin workarounds, and defer entry-target checks - #143

Open
rpatters1 wants to merge 1 commit into
mainfrom
mnx-gap-quiet-and-workarounds
Open

rpatters1 wants to merge 1 commit into
mainfrom
mnx-gap-quiet-and-workarounds

Conversation

@rpatters1

Copy link
Copy Markdown
Collaborator

Logging

The gap report is where gaps go; a client that does not want them is not owed a log full of them.

  • MNX no longer logs each unclassified smart shape or unplaceable gap anchor. classifier-design skill updated to match.
  • Lyric hyphens and word extensions classify as a new smartshape::Suppress, which vanishes from every shape path without export, gap, or log (the lyric that owns them exports or reports them). MusicXML was logging 8,000 of these per run on a large score.
  • A shape that fails calcIsValid keeps its real shapeType in the classification (it used to default to SlurDown), and the MusicXML log says invalid rather than unclassified for it.
  • A text expression whose text block names no text classifies as Suppress. Human Playback authors those for MIDI data; one score carried 1,740 warnings about them.

musxdom pin → aff4981c (openmusx/musxdom#199, #200)

musxdom now interprets the Beam Over Barlines plugin's default singleton-beam form, merges the tie flags the plugin splits across the two entries, and follows an entry-attached endpoint's entry when its recorded measure went stale. Denigma reads tie flags through NoteInfoPtr::calcHasTieStart/calcHasTieEnd (MNX, MusicXML, ottavas) and endpoint staves/measures through EndPoint::calcStaff/calcMeasure — except at the four assignment-dispatch sites, which stay on the recorded measure because that is where Finale keeps the assignment (each carries a comment). mnxdom pin (ee14988b) confirmed current.

MNX safety nets

  • A zero-length tuplet the interpreted iterator does not resolve is omitted with its entries instead of written with "multiple": 0, which the schema rejects. Beams, ties and slurs skip the omitted entries. Recorded in design-decisions.md. Since the pin advance this no longer fires on the score that motivated it.
  • Ties and slurs written against an entry are deferred and checked in finalizeEntryTargets once every entry has been exported: a tie whose target is not in the document becomes lv, a slur whose end is not is removed and reported as a gap. A cue-discarded measure was leaving a tie pointing at a note that did not exist.

Verification

  • 496/496 tests; check_format.py clean.
  • A 2,375-measure opera score: MNX export now passes schema and semantic validation (previously failed schema on 21 tuplets); verbose log 2,776 → 1,018 lines. MusicXML verbose log 8,228 → 231 lines, and 18 previously-dropped slurs export.

No fixture exercises the zero-length-tuplet fallback, a cue-discarded tie target, or a stale endpoint; those paths are verified only against that score.

🤖 Generated with Claude Code

…et checks

Logging: the gap report is where gaps go. The MNX exporter no longer logs
every unclassified smart shape or unplaceable gap anchor, and the MusicXML
exporter no longer logs lyric hyphens and word extensions as unclassified.
Those two shape types now classify as smartshape::Suppress, which vanishes
from every shape path without export, gap, or log; the lyric that owns them
exports or reports them. A shape that fails calcIsValid keeps its real type in
the classification, and the MusicXML log says "invalid" rather than
"unclassified" for it. A text expression whose text block names no text is
suppressed: Human Playback authors those for its MIDI data, and one score
carried 1,740 warnings about them.

musxdom pin advanced to aff4981c, which interprets the Beam Over Barlines
plugin's default (unhidden) singleton beams, merges the tie flags the plugin
splits across the two entries, and follows an entry-attached smart shape
endpoint's entry when its recorded measure went stale. Denigma reads the tie
flags through NoteInfoPtr::calcHasTieStart/calcHasTieEnd and endpoint staves
and measures through EndPoint::calcStaff/calcMeasure, except where a shape is
found from its recorded measure's assignment, which is where Finale keeps it.

MNX safety nets for what musxdom does not interpret: a zero-length tuplet the
iterator does not resolve is omitted with its entries rather than written as a
tuplet with a zero ratio, which the schema rejects; beams, ties and slurs skip
the omitted entries. Ties and slurs written against an entry are checked once
every entry has been exported: a tie whose target is not in the document
becomes l.v., and a slur whose end is not becomes a gap. A cue-discarded
measure was leaving a tie pointing at a note that did not exist.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant