-
Notifications
You must be signed in to change notification settings - Fork 405
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
A few leadsheet-related fixes #1708
A few leadsheet-related fixes #1708
Conversation
…vior as note tags with voice. I see this quite a bit in leadsheets where these are used to position chord changes within a melody note.
Huh. That test failure has nothing to do with this PR. |
…ved. Added missing opFrac().
A second fix: a missing opFrac call in OffsetHierarchyFilter that I ran into. |
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.
LGTM Thanks!
self.voiceIndices.add(vIndex) | ||
# it is a set, so no need to check if already there | ||
# additional time < 1 sec per ten million ops. | ||
for tagSearch in ('note', 'forward'): |
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.
Should we also be searching in <direction>
tags? They're the only other thing that can contain a voice tag. But maybe unnecessary.
@@ -490,7 +490,7 @@ def __call__(self, e, iterator=None): | |||
if not hasattr(iterator, 'iteratorStartOffsetInHierarchy'): | |||
raise FilterException('Can only run OffsetHierarchyFilter on a RecursiveIterator') | |||
|
|||
offset = s.elementOffset(e) + iterator.iteratorStartOffsetInHierarchy | |||
offset = opFrac(s.elementOffset(e) + iterator.iteratorStartOffsetInHierarchy) |
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.
Thanks!
MusicXML import: forward tags with voice should trigger the same behavior as note tags with voice.
I see this quite a bit in leadsheets where these are used to position chordsym changes within a single melody note. The result should be a second voice containing only hidden rests, but instead, they land in the measure with the notes, and they overlap.