feat: model harp-pedals and scordatura directions - #360
Merged
Conversation
webern
force-pushed
the
claude/direction-types-ordering-9l60vv-b
branch
from
July 19, 2026 05:20
6a5b7b5 to
da3b663
Compare
webern
force-pushed
the
claude/direction-types-ordering-9l60vv-c
branch
from
July 19, 2026 05:20
98a1d4d to
23b0860
Compare
3 tasks
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
force-pushed
the
claude/direction-types-ordering-9l60vv-c
branch
from
July 19, 2026 05:31
23b0860 to
b5dd8bd
Compare
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
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 of the unmodeled direction types.
Summary
Third slice of #324 (stacked on #359): the two list-payload direction types, harp-pedals and scordatura.
HarpPedalsDataholds a vector ofHarpPedalTuning(pedal step + alter/cents, following the PitchData int-alter + cents convention);ScordaturaDataholds a vector ofAccordData(optional string number + tuning step/alter/cents/octave).DirectionData,DirectionReader, andDirectionWriterwithorderedComponentsfidelity.With this, the percussion family is the only remaining unmodeled direction-type choice (next PR).
lysuite/ly31a_Directions.xmlnow models all of its direction-type content but stays blocked on<pedal type="change"/>(the pedal-type gap tracked in #324).Testing
DirectionMarksRoundTriptests: harp-pedals diagram, scordatura with and without string numbers (73 assertions in 14 test cases across the file)References