Skip to content

feat: model principal-voice, other-direction, image, and accordion-registration directions - #359

Merged
webern merged 1 commit into
mainfrom
claude/direction-types-ordering-9l60vv-b
Jul 19, 2026
Merged

feat: model principal-voice, other-direction, image, and accordion-registration directions#359
webern merged 1 commit into
mainfrom
claude/direction-types-ordering-9l60vv-b

Conversation

@webern

@webern webern commented Jul 17, 2026

Copy link
Copy Markdown
Owner

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.

  • New api types PrincipalVoiceData (+ PrincipalVoiceType/PrincipalVoiceSymbol), OtherDirectionData, ImageData, and AccordionRegistrationData, wired through DirectionData, DirectionReader, and DirectionWriter with orderedComponents fidelity.
  • <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.
  • An accordion-registration with nothing engaged is legal (it draws the empty diagram) and round-trips as such.

Remaining #324 order: harp-pedals and scordatura next; then the percussion family; metronome extras and the pedal-type gaps last. Note lysuite/ly31a_Directions.xml also needs <pedal type="change"/>, so it stays blocked until the pedal-type work.

Testing

  • New DirectionMarksRoundTrip tests for the four elements, incl. image geometry/valign and the empty accordion registration (49 assertions in 11 test cases across the file)
  • Full api/impl suite passes (5032 assertions in 438 test cases)
  • Discovery: 245 PASS, zero regressions; baseline 236 -> 245, including the real-world lysuite/ly75a_AccordionRegistrations.xml; regression mode 245/245

References


Generated by Claude Code

@webern webern added feature new feature request non-breaking fixes or implementation that do not require breaking changes api Affects the mx::api layer impl Affects the mx::impl layer ai Issues opened by, or through, a coding agent. labels Jul 17, 2026 — with Claude
Base automatically changed from claude/direction-types-ordering-9l60vv to main July 19, 2026 05:17
…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
webern force-pushed the claude/direction-types-ordering-9l60vv-b branch from 6a5b7b5 to da3b663 Compare July 19, 2026 05:20
@webern
webern merged commit e195193 into main Jul 19, 2026
7 checks passed
@webern
webern deleted the claude/direction-types-ordering-9l60vv-b branch July 19, 2026 05:27
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
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 non-breaking fixes or implementation that do not require breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant