musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
11.86k stars 2.57k forks source link

[MU4 Issue] musicxml import wrong accidentals #12993

Open sammik opened 1 year ago

sammik commented 1 year ago

Describe the bug Imorting musicxml, accidentals are sometimes wrong (missing explicit /cautionary/ "convential" accidental on second note, or, oposite, extra microtonal accidental, where it was not, or different accidental)

To Reproduce Steps to reproduce the behavior:

  1. Import attached musicxml file accidental_test-reference.musicxml.zip

  2. See result

Expected behavior Accidentals should be exactly same, as in musicxml file.

Screenshots import-bug

Platform information

Additional context convential accidentals if there is explicit /cautionary/ accidental on second note in bar, it disappear during import

microtonal accidentals Stein-Zimmermann accidentals are added to all "altered" notes, even if there were not in musicxml

Tantacrul commented 1 year ago

Bumping to 4.x for now (we plan to tackle MusicXML issues a lot very soon after 4.0 is out)

Will reopen after 4.0 is released.

olin256 commented 6 months ago

Another strange behaviour of accidentals in MusicXML import: 201_example.zip Why did bass get a natural on D, but tenor did not? missing_natural

Jojo-Schmitz commented 6 months ago

Why should it? Accidentals are valid for the rest of the measure in the same staff

Hmm, actually there is a natural mentioned in the XML:

      <note>
        <pitch>
          <step>D</step>
          <octave>4</octave>
        </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>quarter</type>
        <accidental>natural</accidental>
        <stem>up</stem>
        <staff>2</staff>
      </note>

So this courtesy/cautionary accidental should be honored the same way as the other one an octave below (which is otherwise superfluous too)

Same issue in Mu3 BTW

There's another issue with importing that XML file: it looses the 'hanging' ties. (Mu3.7 does import them correctly), should be worth a separate issue

olin256 commented 6 months ago

Well, yes, the primary reason for the natural being there is that the MusicXML file says so. It seems that this has been a topic of discussion already ages ago.

On a more practical level – isn't it just natural to have a natural at both the notes? When they come at the same time? As a keyboard player, I would very much expect that.

I've changed the file slightly: 201_sharps.zip Now the alto has D natural, while tenor and bass get D#. Both the notes get a sharp now, a much more natural approach I'd say.

As for the 'hanging' ties, sorry for those, I've extracted this measure from a larger score and did not notice those.

Jojo-Schmitz commented 6 months ago

As per https://musescore.org/en/node/23680 that got fixed ages ago in 2.3, but apparently that isn't really the case (2.3.2 does have that issue too That hanging slur issue is still worth a separate report ;-)

olin256 commented 6 months ago

That hanging slur issue is still worth a separate report ;-)

Could you file that report? I have no idea what the outcome should look like and would have to install some older version for that…

Jojo-Schmitz commented 6 months ago

Done, see #21108