Skip to content

Commit

Permalink
Fix warning + increment version
Browse files Browse the repository at this point in the history
  • Loading branch information
TimFelixBeyer committed Jul 25, 2023
1 parent 1bc59ab commit fea95c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion music21/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'''
from __future__ import annotations

__version__ = '9.2.0b1'
__version__ = '9.2.0b2'

def get_version_tuple(vv):
v = vv.split('.')
Expand Down
2 changes: 1 addition & 1 deletion music21/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<class 'music21.base.Music21Object'>
>>> music21.VERSION_STR
'9.2.0b1'
'9.2.0b2'
Alternatively, after doing a complete import, these classes are available
under the module "base":
Expand Down
9 changes: 5 additions & 4 deletions music21/musicxml/xmlToM21.py
Original file line number Diff line number Diff line change
Expand Up @@ -2200,14 +2200,15 @@ def adjustTimeAttributesFromMeasure(self, m: stream.Measure):
# otherwise it was likely the result of malformed MusicXML.
if (diff > 0.5
or nearestMultiple(diff, 0.0625)[1] < tol
or nearestMultiple(diff, opFrac(1 / 12))[1] < tol):
or nearestMultiple(diff, 1 / 12)[1] < tol):
mOffsetShift = mHighestTime
else:
mOffsetShift = lastTimeSignatureQuarterLength
warnings.warn(
f"Warning: measure {m.number} in part {self.stream.partName}"
f"is overfull: {mHighestTime} > {lastTimeSignatureQuarterLength},"
f"assuming {mOffsetShift} is correct."
f'Warning: measure {m.number} in part {self.stream.partName}'
f'is overfull: {mHighestTime} > {lastTimeSignatureQuarterLength},'
f'assuming {mOffsetShift} is correct.',
MusicXMLWarning
)
elif (mHighestTime == 0.0
and not m.recurse().notesAndRests.getElementsNotOfClass('Harmony')
Expand Down

0 comments on commit fea95c6

Please sign in to comment.