-
Notifications
You must be signed in to change notification settings - Fork 431
Apply tuplet to multiple components to express durations like 5/6 or 7/3 QL #1240
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
base: master
Are you sure you want to change the base?
Changes from 21 commits
19ef21f
7f26ed3
27469ba
d34cf4f
c7628eb
927c5b4
4b4b2c0
aa4e3db
a5183d2
becec13
ead11fc
869baff
2b80b1a
61fb0c7
876c010
3759469
8996abf
d0e668b
263dab2
3c5d187
65575cd
12c8c49
89df531
a825cd2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2888,15 +2888,19 @@ def fixupNotationFlat(self): | |
| ''' | ||
| Runs makeNotation on a flatStream, such as one lacking measures. | ||
| ''' | ||
| # Do this before makeNotation so that measures are filled correctly | ||
| self.stream = self.stream.splitAtDurations(recurse=True)[0] | ||
|
|
||
| part = self.stream | ||
| part.makeMutable() # must mutate | ||
| # try to add measures if none defined | ||
| # returns a new stream w/ new Measures but the same objects | ||
| part.makeNotation(meterStream=self.meterStream, | ||
| refStreamOrTimeRange=self.refStreamOrTimeRange, | ||
| inPlace=True) | ||
| # environLocal.printDebug(['fixupNotationFlat: post makeNotation, length', | ||
| # len(measureStream)]) | ||
|
|
||
| # Do this again, since makeNotation() might create complex rests | ||
| self.stream = self.stream.splitAtDurations(recurse=True)[0] | ||
|
Comment on lines
+2902
to
+2903
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's fairly rare to go through
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong. |
||
|
|
||
| # after calling measuresStream, need to update Spanners, as a deepcopy | ||
| # has been made | ||
|
|
@@ -2923,6 +2927,9 @@ def fixupNotationMeasured(self): | |
|
|
||
| * Changed in v7: no longer accepts `measureStream` argument. | ||
| ''' | ||
| # Split complex durations in place (fast if none found) | ||
| self.stream = self.stream.splitAtDurations(recurse=True)[0] | ||
|
|
||
| part = self.stream | ||
| measures = part.getElementsByClass(stream.Measure) | ||
| first_measure = measures.first() | ||
|
|
@@ -2959,9 +2966,9 @@ def fixupNotationMeasured(self): | |
| # incorrectly flagging MusicXMLWarning as not a Warning | ||
| # noinspection PyTypeChecker | ||
| warnings.warn(MusicXMLWarning, str(se)) | ||
| if not part.streamStatus.tuplets: | ||
| for m in measures: | ||
| for m_or_v in [m, *m.voices]: | ||
| for m in measures: | ||
| for m_or_v in [m, *m.voices]: | ||
| if not m_or_v.streamStatus.tuplets: | ||
| stream.makeNotation.makeTupletBrackets(m_or_v, inPlace=True) | ||
|
|
||
| if not self.spannerBundle: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.