-
Notifications
You must be signed in to change notification settings - Fork 434
stripTies() now sets StreamStatus.beams = False
#1005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stripTies() now sets StreamStatus.beams = False
#1005
Conversation
splitAtDurations earlier during musicxml export (and recurse)
|
Other than that Q on dot groups, looks good to me! And probably worth merging first since the actual problem solved is so much bigger. |
|
Super, is there a review you need to submit so I can see the dot groups stuff? |
Exporting nested measures wasn't supported, so don't make it look like it's supported now
mscuthbert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! Here's the review!
| # split at durations, if not a full-measure rest (e.g. whole rest in 9/8) | ||
| if 'GeneralNote' in classes and obj.duration.type == 'complex' and not ( | ||
| 'Rest' in classes and ( | ||
| obj.fullMeasure in (True, 'always') | ||
| or (obj.fullMeasure == 'auto' and obj.duration == self.stream.barDuration) | ||
| ) | ||
| ): | ||
| objList = obj.splitAtDurations() | ||
| else: | ||
| objList = [obj] | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why this can be removed? Are we doing it elsewhere? Ah, I see below. Interesting! Does it work with dotGroups, since they're only split above?
Perhaps dotGroups should also be split in splitAtDurations (as an optional parameter) since they're something most software, including the musicxml spec, can't handle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think both this and the 'inexpresible' bit above show that there is still a need to call splitAtDurations() in these edge cases. I'll restore the else: objList = [obj] bits so that all we skip here is the full-measure rest logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For anyone else: the reason this was moved into splitAtDurations() was because it needed to be moved somewhere earlier during musicxml parsing so that beams could be made afterward (fixupNotationMeasured), and it seemed convenient to just make it splitAtDuration()'s responsibility.
|
Sorry about that -- mentioned the review now. if this works, we're fine. |
Before this patch this would fail downstream. Just noticed now it will silently export invalid musicxml, so now raise an informative error.
checked this against the most recent commit on this branch and get correct output (i.e. same as master) |
|
Thanks for catching the multiple StreamIterators; I had just internalized that |
stripTies()#994:stripTies()sets StreamStatus.beams = FalsefixupNotationMeasured()in musicxml export so that it doesn't use a dummy stream as an iterator and then query that dummy stream for its beam statussplitAtDurations()earlier in musicxml export so that it happens before fixupNotationMeasured remakes beamssplitAtDurations()