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
12.23k stars 2.65k forks source link

Musescore 4 Piano part uses the wrong staff from an imported musicXML file #17109

Open pointmatic opened 1 year ago

pointmatic commented 1 year ago

Issue type

Engraving bug

Bug description

When I import a musicXML file, the main score shows all the music correctly, but the piano part (grand staff) shows the bass clef of another staff, and the playback is correct. Creating a new part with works fine.

This problem does not occur in Musescore 3.

The main score is correct. The piano part shows the correct treble staff and the staff after the piano grand staff, which happens to be the String Bass in this composition.

See the attached screenshots and musicXML file.

Steps to reproduce

  1. import the attached music XML file.
  2. notice the bass staff for the piano in the main score.
  3. using the "Parts" dropdown menu (center of window header, below the window title), open the "Piano" part.
  4. notice the bass staff displays notes from the "String Bass" staff.
  5. click the play button (top right of screen) and notice that the piano part bass staff playback is correct (plays correct piano bass staff notes shown in the main score), not what is displayed in the piano part.
  6. if needed, to make it easier to hear, go back to the main score and assign Musescore sounds to all the tracks (Alto Flute, Violas for Strings, Violoncello (Solo), Contrabasses. Add the "pizz." text (Text palette) to the first note in the "String Bass" staff to make it even more clear to hear.
  7. repeat steps 3-5 again.
  8. create a new part by opening the "Parts" dropdown (top center of screen), then click the "Create New Part" button (top right of pop-over window). The new part will have a default name "Part". You can rename that in the three-dot menu.
  9. In the "Instruments" tab in the left sidebar, enable visibility of the "Piano" on that part

Jesus Home v2022-12-25e.mxl.zip

Screenshots/Screen recordings

Main Score (excerpt)

The main score shows the piano grand staff with a two-note interval in the bass staff and a single note in the string bass staff (below the piano).

Screenshot 2023-03-27 at 2 30 14 AM

Piano Part (incorrect bass staff)

However in the piano part screen shot, the staff for the string bass is presented as the lower part of the grand staff. It's wrong. If I manually construct a part with the piano instrument, it's fine...so I'm just renaming every piano part of every score I import as "Piano corrupted" since I can't use it.

Screenshot 2023-03-27 at 2 30 33 AM

MuseScore Version

MuseScore version (64-bit): 4.0.2-230651546, revision: dbe7c6d

Regression

Yes, this used to work in Musescore 3.x and now is broken

Operating system

MacOS 13.2

Additional context

No response

pointmatic commented 1 year ago

I initially posted this in the forum and @Jojo-Schmitz responded to confirm that this is in fact a regression.

https://musescore.org/en/comment/1182904#comment-1182904

Jojo-Schmitz commented 1 year ago

Not really an engraving bug, but a MusicXML import one. @lvinken ?

lvinken commented 1 year ago

The issue does not reproduce for me (commit dbe0798 on Ubuntu). The MusicXML file and also the MuseScore file produced from it look completely normal to me. So far I have no idea what may be causing this issue and if it is in any way related to MusicXML import.

Edit: the commit mentioned is in (as of today still unmerged) PR16901, which should not affect this issue.

Jojo-Schmitz commented 1 year ago

It indeed doesn't reproduce with the latest build from the master branch It does though on 4.0.2.

I guess we can call it fixed...

pointmatic commented 1 year ago

Just to confirm, I simplified the test XML file (see attached) so it should be very clear when it is wrong, if it indeed still is reproducible. There is only a grand staff and an extra staff with a few measures. The 3rd staff has has a bunch of 16th notes so it's easy to see when it's showing in the bass clef (incorrectly), and NOT being played as shown in audio playback.

I've also made a video of how it is working in my version. OS: macOS 13.2, Arch.: x86_64, MuseScore version (64-bit): 4.0.2-230651546, revision: github-musescore-musescore-dbe7c6d

Simplified_MusicXML_import_test_with_video.zip

Main Score

Everything looks fine here in the main score. Now look at the piano part.

Screenshot 2023-04-03 at 12 37 12 AM

Piano Part (incorrect bass staff)

The bass staff is clearly not what is showing in the main score.

Screenshot 2023-04-03 at 12 37 44 AM

Anyway, I look forward to trying this test on the next stable release.

Jojo-Schmitz commented 1 year ago

Try a recent nightly build, it doesn't reproduce there