Skip to content

feat: model harp-pedals and scordatura directions - #360

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

feat: model harp-pedals and scordatura directions#360
webern merged 1 commit into
mainfrom
claude/direction-types-ordering-9l60vv-c

Conversation

@webern

@webern webern commented Jul 17, 2026

Copy link
Copy Markdown
Owner

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

  • New DirectionMarksRoundTrip tests: harp-pedals diagram, scordatura with and without string numbers (73 assertions in 14 test cases across the file)
  • Full api/impl suite passes (5056 assertions in 441 test cases)
  • Discovery: 248 PASS, zero regressions; baseline 245 -> 248 (synthetic harp-pedals.3.0/.3.1, scordatura.3.1); regression mode 248/248

References

@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
@webern
webern force-pushed the claude/direction-types-ordering-9l60vv-b branch from 6a5b7b5 to da3b663 Compare July 19, 2026 05:20
@webern
webern force-pushed the claude/direction-types-ordering-9l60vv-c branch from 98a1d4d to 23b0860 Compare July 19, 2026 05:20
Base automatically changed from claude/direction-types-ordering-9l60vv-b to main July 19, 2026 05:27
Third slice of #324: HarpPedalsData (pedal-tuning list following the
PitchData int-alter + cents convention) and ScordaturaData (accord list
with optional string numbers) are wired through DirectionReader and
DirectionWriter with orderedComponents fidelity. MusicXML requires at
least one pedal-tuning/accord child, so an empty api list cannot be
expressed and is not written.

Round-trip baseline 245 -> 248. The percussion family is now the only
unmodeled direction-type choice.
@webern
webern force-pushed the claude/direction-types-ordering-9l60vv-c branch from 23b0860 to b5dd8bd Compare July 19, 2026 05:31
@webern
webern merged commit 612ec39 into main Jul 19, 2026
7 checks passed
@webern
webern deleted the claude/direction-types-ordering-9l60vv-c branch July 19, 2026 05:34
webern added a commit that referenced this pull request Jul 19, 2026
## Human Summary

More direction types that were unmodeled.

## Summary

Fourth slice of #324 (stacked on #360): the percussion pictogram family,
the last unmodeled direction-type choice.

- `PercussionData` carries formatting, an optional enclosure, and a
`PercussionDataChoice` — a TimeChoice/MarkDataChoice-style variant class
over the eleven pictogram alternatives (glass, metal, wood, pitched,
membrane, effect, timpani, beater, stick, stick-location,
other-percussion), each a small struct pairing its instrument enum with
the optional SMuFL glyph override (plus tip direction / material /
parentheses / dashed-circle for beater and stick).
- Eleven parallel api enums (~150 enumerators) mirror the core value
enums via new Converter EnumMaps, so no value can be silently dropped;
`PercussionEnclosure` carries the full 15-value MusicXML 4.0
enclosure-shape list (inverted-bracket, pentagon..decagon included).
- Reader/writer wired through `DirectionReader`/`DirectionWriter` with
`orderedComponents` fidelity. Like the existing words handling, several
`<percussion>` children of one direction-type read into separate
`PercussionData` items and are written back one per direction-type; no
corpus file groups them, so nothing currently loses fidelity.

With this, every direction-type choice is modeled. Remaining #324 items
are the metronome extras (metric modulation) and the pedal-type gaps
(sostenuto/change/continue/discontinue/resume).

## Testing

- [x] New `DirectionMarksRoundTrip` tests covering all eleven
alternatives, enclosure, tip direction, stick attributes, and the
timpani SMuFL override (108 assertions in 20 test cases across the file)
- [x] Full api/impl suite passes (5091 assertions in 447 test cases)
- [x] Discovery: 272 PASS, zero regressions; baseline 248 -> 272 (the
full synthetic percussion family); regression mode 272/272

## References

- Progresses #324
- Stacked on #360; 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