Support for <tuplet-dot/>
and <normal-dot/>
tags when parsing tuplets
#429
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.
Following my previous PR #414, I noticed that it didn't cover all possible tuplets cases. In particular, in addition to allow things like "5 eighth notes in the space of 2 quarter notes", MusicXML also allows things like "5 eighth notes in the space of 2 dotted quarter notes". My previous implementation wasn't taking into account the eventual dots in the tuplet normal duration.
Those dots can be seen in two places:
<tuplet-dot/>
in<tuplet-normal>
or<tuplet-actual>
tags (themselves in<tuplet type="start">
tags)<normal-dot/>
tags in<time-modification>
tags (not sure why there isn't any<actual-dot/>
in the MusicXML spec)I've adapted the tuplet test to test one of those dotted cases too.
References: