feat: model all pedal types in mx::api - #364
Merged
Merged
Conversation
DirectionReader::parsePedal previously handled only PedalType start/stop and silently dropped sostenuto, change, continue, discontinue, and resume. Replace the DirectionData::pedalStarts / pedalStops spanner vectors with a single std::vector<PedalData> pedals, where PedalData carries a PedalKind enum covering all seven pedal-line types. Line pedals (line="yes", plus the inherently line-formatting types) go to pedals; sign start/stop still route through MarkData as MarkType::pedal / damp. This is a breaking reshape of DirectionData's pedal fields. Part of #324.
This was referenced Jul 19, 2026
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
Changes the way pedals are modeled into two different things. Pedal marks, which are the old fashioned Ped and * marks, and a separate type for more modern lines.
Summary
DirectionReader::parsePedalhandled onlyPedalTypestart/stop and silently droppedsostenuto,change,continue,discontinue, andresume, even thoughcore::PedalTypecarries all seven tags. This was the last unmodeled item in #324.
The shape decision (called for in #324) was to store the pedal type as one fact in one field
rather than scatter it across start/stop/other vectors. This replaces the
pedalStarts/pedalStopsspanner vectors onDirectionDatawith a singlestd::vector<PedalData> pedals,where each
PedalDatacarries aPedalKindenum covering every pedal-line type. Each pedal eventstands on its own and is placed at its own tick, so the model has no neighbor-dependent meaning.
PedalData.h: thePedalKindenum (start,stop,sostenuto,change,continueLine,discontinue,resume) and thePedalDatastruct.line="yes", plus the inherently line-formatting typessostenuto/change/continue/discontinue/resume) go topedals; sign start/stop stillroute through
MarkDataasMarkType::pedal/damp, unchanged.emitPedalmapsPedalKindback tocore::PedalType, emitsline="yes", andemits nothing for an unspecified kind.
Only two corpus files use these types (
lysuite/ly31a_Directions.xml,lysuite/ly33a_Spanners.xml)and both fail first on unrelated features, so this does not flip any file to PASS. It is validated
by a focused unit test that round-trips each pedal type through the api.
This is a breaking change: it reshapes
DirectionData's pedal fields.Testing
PedalAllKindsround-trips all seven pedal types through the api;PedalPlacementcoversplacement (
*Pedal*: 44 assertions in 5 test cases)References
symbolitem from that worklist is tracked separately by Proposal: Support Interleaved Words and Symbols inmx::apiDirections #294 and is notincluded here)