Skip to content

feat: key signature print-object in mx::api - #468

Open
webern wants to merge 1 commit into
m/mxdev-harmframefrom
m/mxdev-keyprint
Open

webern wants to merge 1 commit into
m/mxdev-harmframefrom
m/mxdev-keyprint

Conversation

@webern

@webern webern commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

<key print-object="no"> (a key signature that applies to the music but is not drawn) had no api
home, so it was written back as a plain <key> and the signature became visible.

KeyData gains printObject, a tri-state Bool that mirrors ClefData::printObject. The reader
fills it for traditional and non-traditional keys; PropertiesWriter::writeKey, the one place a
<key> is built, emits it when it is not unspecified. The default leaves output unchanged.
data/api.features.xml marks key print-object as supported.

musuite/testInvisibleElements.xml now round-trips and is pinned in the baseline.

Not addressed here: the non-traditional key reader branch still does not set staffIndex or
tickTimePosition, and other <key> attributes (color, position, font) are still dropped.

Testing

  • New PrintObject* cases in KeyDataTest.cpp: no, yes, unspecified (omitted), non-traditional,
    per-staff, and equality
  • make api-test passes (6141 assertions in 710 test cases)
  • make api-roundtrip passes, 442 of 442 pinned files
  • make api-roundtrip-discover: 442 pass, no file that passed before now fails
  • make fmt-check passes

References

@webern webern added feature new feature request api Affects the mx::api layer impl Affects the mx::impl layer ai Issues opened by, or through, a coding agent. labels Oct 28, 2026
@webern webern mentioned this pull request Oct 28, 2026
7 tasks done
@webern
webern added this pull request to stack #475 October 28, 2026 20:08
@webern
webern marked this pull request as ready for review October 29, 2026 07:08
@webern webern changed the title feat: round-trip key signature print-object in mx::api feat: key signature print-object in mx::api Oct 30, 2026
<key print-object="no"> (a key signature that applies to the music but is
not drawn) had no api home, so it was written back as a plain <key> and the
signature became visible.

KeyData gains printObject, a Bool that mirrors ClefData::printObject. The
reader fills it for traditional and non-traditional keys, and the writer
emits it when it is not unspecified. The default leaves output unchanged.

musuite/testInvisibleElements.xml now round-trips and is pinned in the
baseline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Issues opened by, or through, a coding agent. api Affects the mx::api layer feature new feature request impl Affects the mx::impl layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant