-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix for #133 parsing and indexing for partial/irregular measures #256
Conversation
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.
This looks like a nice addition! I have a couple of comments regarding extra commented lines and a formatting of the __str__
representation of the Measure
.
partitura/io/importmusicxml.py
Outdated
@@ -456,13 +456,14 @@ def _parse_parts(document, part_dict): | |||
# shift.applied = True | |||
|
|||
|
|||
def _handle_measure(measure_el, position, part, ongoing, doc_order): | |||
def _handle_measure(measure_el, position, part, ongoing, doc_order, measure_counter): | |||
# print('_handle_measure') # NOTE del | |||
""" |
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.
Maybe it would be worthwhile to document the function a little bit, since there is a new parameter (measure_counter
). It would be nice to fully document all functions at some point 😉
partitura/score.py
Outdated
|
||
def __str__(self): | ||
return f"{super().__str__()} number={self.number}" | ||
return f"{super().__str__():16s} number={self.number} name={self.name}" |
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.
Why is the addition of the spaces necessary (the :16s
)? Is it because of a specific formatting required by pretty_print
?
Measure object now has 'number' and 'name' property: