From c7c439b53c9f0f0d47c2673a7f25a61579da961a Mon Sep 17 00:00:00 2001 From: TimFelix <35711942+TimFelixBeyer@users.noreply.github.com> Date: Mon, 4 Mar 2024 14:41:57 +0100 Subject: [PATCH] Revert unrelated changes --- music21/analysis/reduceChords.py | 2 +- music21/analysis/reduceChordsOld.py | 2 +- music21/braille/text.py | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/music21/analysis/reduceChords.py b/music21/analysis/reduceChords.py index c8961eecd..6aaf44e5f 100644 --- a/music21/analysis/reduceChords.py +++ b/music21/analysis/reduceChords.py @@ -384,7 +384,7 @@ def procedure(timespan): ) print(msg) # raise ChordReducerException(msg) - offset = min(offset, previousTimespan.endTime) + offset = max(offset, previousTimespan.endTime) scoreTree.removeTimespan(group[0]) subtree.removeTimespan(group[0]) newTimespan = group[0].new(offset=offset) diff --git a/music21/analysis/reduceChordsOld.py b/music21/analysis/reduceChordsOld.py index 24124161e..886c2180d 100644 --- a/music21/analysis/reduceChordsOld.py +++ b/music21/analysis/reduceChordsOld.py @@ -79,7 +79,7 @@ def reduceMeasureToNChords(self, 4.0 ''' from music21 import note - if not measureObj.isFlat: + if measureObj.isFlat is False: mObj = measureObj.flatten().notes.stream() else: mObj = measureObj.notes.stream() diff --git a/music21/braille/text.py b/music21/braille/text.py index 7bd468a9d..20d2d39cc 100644 --- a/music21/braille/text.py +++ b/music21/braille/text.py @@ -599,7 +599,10 @@ def canAppend(self, text, addSpace=True): ''' searchLocation = max(self.highestUsedLocation, self.textLocation) addSpaceAmount = 1 if addSpace else 0 - return (searchLocation + len(text) + addSpaceAmount) <= self.lineLength + if (searchLocation + len(text) + addSpaceAmount) > self.lineLength: + return False + else: + return True def canInsert(self, textLocation, text): '''