-
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
Fix #17185: MusicXML ignores custom string data #17490
Fix #17185: MusicXML ignores custom string data #17490
Conversation
This PR also solves another unreported problem. When you tune a string to a -1 octave, say C-1 and export it to MusicXML, the exported file gets corrupted because the |
I don't quite understand how the changes of this PR could lead to those unit test failures, which are about the number of frets but not their tuning? But I guess just adjusting that test is the correct way of dealing with this |
A quick check shows at least the staff tuning is imported correctly with this PR. Please also add one or more test files. |
#17185 also looks fine on my side (Windows10) , but tests should be fixed at first. @HemantAntony Can you look into it please? |
Backport of musescore#17490, commit 2
Backport of musescore#17490, commit 1
Backport of musescore#17490, commit 1 Also fix mtests
Backport of musescore#17490, commit 2
That mtest failure is related to the 1st commit, not to the 2nd |
f88f436
to
fa1c2c1
Compare
fa1c2c1
to
0e5d874
Compare
Fixed the tests and updated the PR. I also added two tests to test both problems (#17185 and negative octave). Also should I add PDFs of the test files? I see there are PDFs of |
|
||
static void clampMusicXmlOctave(int& octave) | ||
{ | ||
octave = std::clamp(octave, 0, 9); |
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.
This seems to be C++17 and later only, am I right that octave = std::max(std::min(octave, 9), 0);
is the same thing for older C++ standards?
Backport of musescore#17490, commit 1
Backport of musescore#17490, commit 2
Backport of musescore#17490, commit 1
Backport of musescore#17490, commit 2
Backport of musescore#17490, commit 2
Backport of musescore#17490, commit 2
Tested #17185 on Win10, Mac13 - FIXED @HemantAntony Thanks for fixing! |
Backport of musescore#17490, commit 1
Backport of musescore#17490, commit 2
Backport of musescore#17490, commit 2
Backport of musescore#17490, commit 1
Resolves: #17185