Skip to content

feat: model the percussion direction family - #361

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

feat: model the percussion direction family#361
webern merged 1 commit into
mainfrom
claude/direction-types-ordering-9l60vv-d

Conversation

@webern

@webern webern commented Jul 19, 2026

Copy link
Copy Markdown
Owner

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

  • 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)
  • Full api/impl suite passes (5091 assertions in 447 test cases)
  • Discovery: 272 PASS, zero regressions; baseline 248 -> 272 (the full synthetic percussion family); regression mode 272/272

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 19, 2026 — with Claude
@webern
webern force-pushed the claude/direction-types-ordering-9l60vv-c branch from 23b0860 to b5dd8bd Compare July 19, 2026 05:31
Base automatically changed from claude/direction-types-ordering-9l60vv-c to main July 19, 2026 05:34
Fourth slice of #324: PercussionData with a TimeChoice-style
PercussionDataChoice over the eleven pictogram alternatives, eleven
parallel api enums mapped through new Converter EnumMaps so no value can
be silently dropped, and the full 15-value MusicXML 4.0 enclosure-shape
list. Wired through DirectionReader and DirectionWriter with
orderedComponents fidelity.

Round-trip baseline 248 -> 272 (the full synthetic percussion family).
All direction-type choices are now modeled.
@webern
webern force-pushed the claude/direction-types-ordering-9l60vv-d branch from 22584d6 to 969a10f Compare July 19, 2026 05:35
@webern
webern merged commit c19b272 into main Jul 19, 2026
7 checks passed
@webern
webern deleted the claude/direction-types-ordering-9l60vv-d branch July 19, 2026 05:55
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