-
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
MusicXML import of common and cut time is too strict #20207
Comments
We have: // determine if timesig is valid
if (beats == "2" && beatType == "2" && timeSymbol == "cut") {
st = TimeSigType::ALLA_BREVE;
bts = 2;
btp = 2;
return true;
} else if (beats == "4" && beatType == "4" && timeSymbol == "common") {
st = TimeSigType::FOUR_FOUR;
bts = 4;
btp = 4;
return true;
} else Would this: if (timeSymbol == "cut") {
st = TimeSigType::ALLA_BREVE;
} else if (timeSymbol == "common") {
st = TimeSigType::FOUR_FOUR;
} else if (!timeSymbol.isEmpty() && timeSymbol != "normal") {
LOGD("determineTimeSig: time symbol <%s> not recognized with beats=%s and beat-type=%s",
qPrintable(timeSymbol), qPrintable(beats), qPrintable(beatType)); // TODO
return false;
}
btp = beatType.toInt();
QStringList list = beats.split("+");
for (int i = 0; i < list.size(); i++) {
bts += list.at(i).toInt();
} be sufficient and pass muster? As #20197 (master), #20198 (4.2.0) are in very close proximity and such a change would cause merge conflicts, I might add that there. |
@Jojo-Schmitz I guess it would indeed be fine to include that in #20197 and #20198. That solution doesn't ensure that the time signature has correct measure length for those symbols (i.e. a whole note) but that's no hard requirement in MuseScore either, right? |
Well, not ensuring the 'correct' measure length is what this issue is all about ;-) |
Well there is a distinction between allowing 4/4 instead of 2/2 and allowing 3/8 instead of 2/2 :) But yeah, I guess it's fine anyway. |
I guess this now allows allows for the just removed CUT_TRIPLE, 9/8 |
Wrt Jojo's proposed code, I do agree but would recommend removing the "with beats=%s and beat-type=%s" part from the LOGD, as it is no longer relevant. Note that MuseScore's GUI allows setting the time signature symbol to common or cut for any time signature, without affect measure duration. E.g. you can create a 3/4 measure with time signature symbol common (whether that makes sense is different question). Why would the MusicXML importer be more restrictive ? In case of doubt, beats and beat type are more likely to be correct thatnthe symbol. See https://musescore.org/en/node/356715 for a real example. |
Done |
Issue type
Import/export issue
Bug description
The time signature with common symbol is imported only when the signature is 4/4, cut when 2/2. This is overly strict. In case common or cut is not recognized, the time signature is ignored and the nominal measure duration will be set to 4/4, which may be incorrect. See determineTimeSig() in files importmxmlpass1.cpp and importmxmlpass2.cpp.
Steps to reproduce
Screenshots/Screen recordings
No response
MuseScore Version
MuseScore unstable prerelease for 4.2.0
Regression
No.
Operating system
Ubuntu 22.04
Additional context
No response
The text was updated successfully, but these errors were encountered: