MuseScore4.2.1 musicXML Import ignores ('editorial') <accidental> attribute 'parentheses'

• Mar 5, 2024 - 15:42

the here attached test file musicXML.Test3.ed.musicxml was created by manually editing (with Windows Wordpad) an uncompressed musicXML file previously exported from MuseScore4.

The original file was edited to modify <accidental>sharp</accidental> declarations thus:
<accidental editorial="yes" parentheses="no">sharp</accidental>

When MuseScore4 opens musicXML.Test3.ed.musicxml, it displays all sharps with parentheses, but I would expect the sharps to be displayed without parentheses (which is what I want).


Comments

In reply to by Jojo-Schmitz

Thank you. I have never used GitHub before. I have created a account and reported the Issue as best I could. I hope that is sufficient.
While I was typing on GitHub, a reference to an apparently similar problem popped up
https://github.com/musescore/MuseScore/pull/21835
I did not know how best to use the popup, so I just included the information in my report.
Incidentally, I could see a provision on the GitHub UI for including pasted info (eg a small graphic), but I could not see a function there for uploading data file(s).

Seems currently by design though:

    if (type != AccidentalType::NONE) {
        auto a = Factory::createAccidental(score->dummy());
        a->setAccidentalType(type);
        if (cautionary || parentheses) {
            a->setBracket(AccidentalBracket(AccidentalBracket::PARENTHESIS));
            a->setRole(AccidentalRole::USER);
        } else if (editorial || bracket) {
            a->setBracket(AccidentalBracket(AccidentalBracket::BRACKET));
            a->setRole(AccidentalRole::USER);
        }
        if (accColor.isValid()) {
            a->setColor(accColor);
        }
        return a;
    }

since https://github.com/musescore/MuseScore/pull/19132

In a test file of my own, I did this. Created a score with parentheses around an accidental. Saved as musicxml. Opened the xml in an editor and did not do the same modification you did. I only changed the "yes" to "no". Saved the new file. The parentheses where gone.

In reply to by Jojo-Schmitz

I know I'm out of my element, here. What was the point of adding the "editorial" lines? He made it sound like it was to either get rid of the parentheses, or to demonstrate that MU4 just ignored them. Yes, MU4 ignored them. But did it need them.

On the other hand, did you open the posted xml? There are no parentheses. Only brackets. When I open an unzipped version in notepad, brackets are mentioned. When I change the "yes" to "no", brackets go away.

Changing the above code to

    if (type != AccidentalType::NONE) {
        auto a = Factory::createAccidental(score->dummy());
        a->setAccidentalType(type);
        if (parentheses) {
            a->setBracket(AccidentalBracket(AccidentalBracket::PARENTHESIS));
            a->setRole(AccidentalRole::USER);
        } else if (bracket) {
            a->setBracket(AccidentalBracket(AccidentalBracket::BRACKET));
            a->setRole(AccidentalRole::USER);
        } else if (cautionary || editorial) {
            a->setRole(AccidentalRole::USER);
        }
        if (accColor.isValid()) {
            a->setColor(accColor);
        }
        return a;
    }

should fix this

In reply to by Jojo-Schmitz

Yes, you are right, it would. However the score from my "real application" which I want Musescore to render correctly is not intended to be Common Western Music Notation. It will be an approximation to "Griffschrift" for interpretation by a musician playing a "diatonic Accordion". Musescore provides a convenient mechanism to get my (musicXML) score rendered and exported to PDF. I chose "editorial" rather than "cautionary" for the accidentals on the premise that a human editor can in principle write whatever they want on the score.

Do you still have an unanswered question? Please log in first to post your question.