feat: model principal-voice, other-direction, image, and accordion-registration directions - #359
Merged
Merged
Conversation
3 tasks
…gistration directions Second slice of #324: PrincipalVoiceData, OtherDirectionData, ImageData, and AccordionRegistrationData are wired through DirectionReader and DirectionWriter with orderedComponents fidelity. The image element's valign-image type (no baseline variant) is handled on the element directly because the generic SFINAE position helpers cannot convert it. Round-trip baseline 236 -> 245, including the real-world lysuite/ly75a_AccordionRegistrations.xml.
webern
force-pushed
the
claude/direction-types-ordering-9l60vv-b
branch
from
July 19, 2026 05:20
6a5b7b5 to
da3b663
Compare
webern
added a commit
that referenced
this pull request
Jul 19, 2026
## Human Summary More of the unmodeled direction types. ## Summary Third slice of #324 (stacked on #359): the two list-payload direction types, harp-pedals and scordatura. - `HarpPedalsData` holds a vector of `HarpPedalTuning` (pedal step + alter/cents, following the PitchData int-alter + cents convention); `ScordaturaData` holds a vector of `AccordData` (optional string number + tuning step/alter/cents/octave). - Both are wired through `DirectionData`, `DirectionReader`, and `DirectionWriter` with `orderedComponents` fidelity. - MusicXML requires at least one pedal-tuning/accord child; an api value with an empty list cannot be expressed and is not written (defined fallback, no error channel). - An accord's optional tuning-alter is emitted only when the alteration is nonzero. With this, the percussion family is the only remaining unmodeled direction-type choice (next PR). `lysuite/ly31a_Directions.xml` now models all of its direction-type content but stays blocked on `<pedal type="change"/>` (the pedal-type gap tracked in #324). ## Testing - [x] New `DirectionMarksRoundTrip` tests: harp-pedals diagram, scordatura with and without string numbers (73 assertions in 14 test cases across the file) - [x] Full api/impl suite passes (5056 assertions in 441 test cases) - [x] Discovery: 248 PASS, zero regressions; baseline 245 -> 248 (synthetic harp-pedals.3.0/.3.1, scordatura.3.1); regression mode 248/248 ## References - Progresses #324 - Stacked on #359; part of #208
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human Summary
More direction types that were todos in the code.
Summary
Second slice of #324 (stacked on #358), continuing through the unmodeled direction-type stubs in order of implementation simplicity. This models the four simple-payload direction types: principal-voice, other-direction, image, and accordion-registration.
PrincipalVoiceData(+PrincipalVoiceType/PrincipalVoiceSymbol),OtherDirectionData,ImageData, andAccordionRegistrationData, wired throughDirectionData,DirectionReader, andDirectionWriterwithorderedComponentsfidelity.<image>'s valign is the valign-image type (top/middle/bottom, no baseline), which the generic SFINAE position helpers cannot convert; the reader and writer handle it on the element directly, and the inexpressible baseline value is not written.Remaining #324 order: harp-pedals and scordatura next; then the percussion family; metronome extras and the pedal-type gaps last. Note
lysuite/ly31a_Directions.xmlalso needs<pedal type="change"/>, so it stays blocked until the pedal-type work.Testing
DirectionMarksRoundTriptests for the four elements, incl. image geometry/valign and the empty accordion registration (49 assertions in 11 test cases across the file)References
Generated by Claude Code