-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
GSoC 2020: measure repeats #6365
GSoC 2020: measure repeats #6365
Conversation
6a531df
to
0828d65
Compare
0828d65
to
eab53a9
Compare
@@ -3735,7 +3721,7 @@ System* Score::collectSystem(LayoutContext& lc) | |||
} else { | |||
m->removeSystemHeader(); | |||
} | |||
while (true) { | |||
for (;;) { | |||
// TODO: what if the nobreak group takes the entire system - is this correct? |
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.
@MarcSabatella I think the answer is yes, but why might it not be?
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.
No idea, but somehow it seems like something to be sure to test.
d0dde1a
to
d6e2d39
Compare
For the record, the answer to that "(?)" in the latest commit message is a no. Doesn't produce correct output if the MeasureRepeat is in a multi-staff instrument (@MarcSabatella, testing and insights on this welcome). |
} else { | ||
Part* part = m->score()->parts().at(partIndex); | ||
for (int i = 0; i < part->nstaves(); ++i) { | ||
int staffIdx = part->staff(i)->idx(); |
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.
Probably there is some slightly more clever way of dealing with this - if you look at the implementation of idx(), you'll see it's relying on indexOf, which is probably slow operation. Not that it really matters, and I know I told you this was the way to do it. But still, you asked for feedback, that's what I've got... :-)
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.
Improved efficiency by only calling it once, before the loop commences.
84e38ba
to
19943c2
Compare
Some notes on MusicXML handling of measure repeats in Sibelius (Ultimate 2020.6), Finale (26.3.1.520), and MuseScore (this branch):
Everything is thoroughly commented and commits have been squashed. I would welcome review from MusicXML specialist @lvinken. |
Btw, for easier review of the export commit, enable "Hide whitespace changes." Most of |
I am perfectly willing to review, but I am severely time-limited at the moment. Most likely I will be unable to spend any time on this for about six weeks :-(. |
Due to an unexpected change of plans, I may have time to look into this on short notice after all. will keep you posted. |
Initial results (after clean build on MacOS):
I also get a consistent crash on exiting MuseScore, but this may very well be unrelated. Stack trace: Finally, I seem to be unable to find any MusicXML test files. Did you create any ? If you did not, please do so. |
2315258
to
03f49e6
Compare
@@ -7,7 +7,7 @@ class MeasureRepeatSettingsModel : public AbstractInspectorModel | |||
{ | |||
Q_OBJECT | |||
|
|||
Q_PROPERTY(PropertyItem* numberPosition READ numberPosition CONSTANT) | |||
Q_PROPERTY(PropertyItem * numberPosition READ numberPosition CONSTANT) |
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.
Uh-huh
@lvinken thanks, I've been dealing with a transition to an unfamiliar computer/operating system and only just got everything into place. I'll have a look at those test failures and create tests next week. |
Hi Isaac, FYI, I also plan to review your code changes to the MusicXML importer/exporter, but haven't found the time to do so yet. Wrt validating the behaviour, that is somewhat difficult. I find the text on http://usermanuals.musicxml.com/MusicXML/MusicXML.htm#CT-MusicXML-measure-repeat.htm quite vague and hard to understand. Furthermore, I do not have access to Finale. I do have Finale Notepad, which does not allow me to create measure repeats, but at least seems to import them. |
03f49e6
to
84ff82f
Compare
@@ -399,7 +399,8 @@ class ScoreElement | |||
#undef CONVERT | |||
|
|||
virtual bool isElement() const { return false; } // overridden in element.h | |||
bool isChordRest() const { return isRest() || isChord() || isRepeatMeasure() || isMMRest(); } | |||
bool isRestFamily() const { return isRest() || isMMRest() || isMeasureRepeat(); } |
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.
The reason I suggested "Type" here is that I was thinking of BarLineType that we used to check for a few related segments types in the same way. But, that's a bit different, so maybe not important to mimic its naming.
357a177
to
c2296e6
Compare
All done. |
c2296e6
to
dc23d2a
Compare
Re-rebased |
- Fix #279071: "Don't Break" element creates hole at end of system - Allow more than two measures to be grouped - Allow adding/toggling NOBREAK by clicking palette - Rename to "Group Measures" - Adjust placement of break symbols Co-authored-by: MarcSabatella <marc@outsideshore.com>
- Public before private - Members prefixed with "m_"
…btypes 1/2/4 - Draw with font symbols instead of QPainterPath - Automatically group measures and delete contents when adding MeasureRepeat - Bring measure.h and measure.cpp in line with new code guidelines - Hide rests by making measures (per MStaff) aware if they are part of measure repeat group - Keep measures and element in sync at all times by handling (preventing/warning/special-casing) many user actions - Add style options for numbering consecutive one-measure repeats
MMRests: - Add vtests for old-style (all fonts), h-bar thickness and margin (Bravura) MeasureRepeats: - Add script tests for adding, cutting/copying with partial group selected, pasting into group, repeating selection from before group, executing split/join/insert/delete measure commands, adding repeat barlines, and adding time signature - Add mtests for parts, MIDI, and MusicXML import/export - Add vtests - Update ref files
dc23d2a
to
0777643
Compare
…style-options Bring back style options for Measure Repeats introduced in PR #6365
- Fix #279071: "Don't Break" element creates hole at end of system - Allow more than two measures to be grouped - Allow adding/toggling NOBREAK by clicking palette - Rename to "Group Measures" - Adjust placement of break symbols Co-authored-by: MarcSabatella <marc@outsideshore.com> Backport of musescore#6365, commit 1, plus some includes cleanup
- Fix #279071: "Don't Break" element creates hole at end of system - Allow more than two measures to be grouped - Allow adding/toggling NOBREAK by clicking palette - Rename to "Group Measures" - Adjust placement of break symbols Co-authored-by: MarcSabatella <marc@outsideshore.com> Backport of musescore#6365, commit 1, plus some includes cleanup
…btypes 1/2/4 - Draw with font symbols instead of QPainterPath - Automatically group measures and delete contents when adding MeasureRepeat - Bring measure.h and measure.cpp in line with new code guidelines - Hide rests by making measures (per MStaff) aware if they are part of measure repeat group - Keep measures and element in sync at all times by handling (preventing/warning/special-casing) many user actions - Add style options for numbering consecutive one-measure repeats Backport of musescore#6365, commit 3, plus some includes cleanup
…btypes 1/2/4 - Draw with font symbols instead of QPainterPath - Automatically group measures and delete contents when adding MeasureRepeat - Hide rests by making measures (per MStaff) aware if they are part of measure repeat group - Keep measures and element in sync at all times by handling (preventing/warning/special-casing) many user actions - Add style options for numbering consecutive one-measure repeats Backport of musescore#6365, commit 3, plus some includes cleanup
…btypes 1/2/4 - Draw with font symbols instead of QPainterPath - Automatically group measures and delete contents when adding MeasureRepeat - Hide rests by making measures (per MStaff) aware if they are part of measure repeat group - Keep measures and element in sync at all times by handling (preventing/warning/special-casing) many user actions - Add style options for numbering consecutive one-measure repeats Backport of musescore#6365, commit 3, plus some includes cleanup
Resolves: https://musescore.org/en/node/10220