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
Porting a bunch of old musicXML fixes #19972
Porting a bunch of old musicXML fixes #19972
Conversation
@@ -61,6 +62,7 @@ class mxmlNoteDuration | |||
Fraction _dura; | |||
TDuration _normalType; | |||
Fraction _timeMod { 1, 1 }; // default to no time modification | |||
MusicXMLParserPass1* _pass1; |
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.
better swap this with the next to avoid a warning reg. wrong order of initialisation
@@ -4755,7 +5236,8 @@ Note* MusicXMLParserPass2::note(const QString& partId, | |||
int msTrack = 0; | |||
int msVoice = 0; | |||
|
|||
if (!_pass1.determineStaffMoveVoice(partId, staff, voice, msMove, msTrack, msVoice)) { | |||
int voiceInt = _pass1.voiceToInt(voice); | |||
if (!_pass1.determineStaffMoveVoice(partId, staff, voiceInt, msMove, msTrack, msVoice)) { | |||
_logger->logDebugInfo(QString("could not map staff %1 voice '%2'").arg(staff + 1).arg(voice), &_e); |
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 using voiceInt
here too?
@@ -707,6 +752,9 @@ TEST_F(Musicxml_Tests, multiMeasureRest4) { | |||
TEST_F(Musicxml_Tests, multipleNotations) { | |||
mxmlIoTestRef("testMultipleNotations"); | |||
} | |||
TEST_F(Musicxml_Tests, negativeOffset) { | |||
mxmlImportTestRef("testNegativeOffset"); | |||
} |
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.
wrong aphabethical order...
TEST_F(Musicxml_Tests, overlappingSpanners) { | ||
mxmlIoTest("testOverlappingSpanners"); | ||
} | ||
TEST_F(Musicxml_Tests, partNames) { | ||
mxmlImportTestRef("testPartNames"); | ||
} |
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.
here too
Backport of musescore#19972, those parts that hadn't been ported already (much) ealier.
Backport of musescore#19972, those parts that hadn't been ported already (much) ealier.
Backport of musescore#19972, those parts that hadn't been ported already (much) ealier.
712ad23
to
c94f584
Compare
auto firstMeasure = _score->measures()->first(); | ||
VBox* vbox = firstMeasure->isVBox() ? toVBox(firstMeasure) : MusicXMLParserPass1::createAndAddVBoxForCreditWords(_score); | ||
vbox->add(t); | ||
} else if (_wordsText != "" || _rehearsalText != "" || _metroText != "") { |
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.
Seems to collide with #8678, which , as far as I can tell, got merged into 3.6.2_backend later
@@ -175,6 +177,12 @@ class MusicXMLParserPass1 | |||
int octaveShift(const QString& id, const staff_idx_t staff, const Fraction f) const; | |||
const CreditWordsList& credits() const { return _credits; } | |||
bool hasBeamingInfo() const { return _hasBeamingInfo; } | |||
bool isVocalStaff(const QString& id) const { return _parts[id].isVocalStaff(); } | |||
static VBox* createAndAddVBoxForCreditWords(Score* const score, const int miny = 0, const int maxy = 75); | |||
const int maxDiff() { return _maxDiff; } |
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.
not rather int maxDiff() const { return _maxDiff; }
? Otherwise there's a warning "'const' type qualifier on return type has no effect"
a779867
to
2bf2a0c
Compare
@@ -3316,7 +3316,7 @@ void MusicXMLParserDirection::handleNmiCmi(Measure* measure, const int track, co | |||
ha->setTrack(track); | |||
MusicXMLDelayedDirectionElement* delayedDirection = new MusicXMLDelayedDirectionElement(totalY(), ha, track, "above", measure, tick); | |||
delayedDirections.push_back(delayedDirection); | |||
_wordsText.replace("NmiCmi", ""); | |||
_wordsText.replace("NmiCmi", "N.C."); |
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 need for such a staff text, as the "N.C." already gets set as a chord symbol
You'd see the issue if and when including the units tests from aca2536
7a02054 correction
0c499e5
to
bd7c5b3
Compare
Backport of musescore#19972, commit 38
Backport of musescore#19972, commit 38
Backport of musescore#19972, commit 38
Backport of one forgotten commit from musescore#19972
Backport of one forgotten commit from musescore#19972
Backport of one forgotten commit from musescore#19972
Each commit here refers to porting an old commit (linked in each description).