MusicXML - incorrect vertical offset applied to rests on import
Nightly acf6580 on Win 7 / 2.0.2 on Win 10
Open the attached score (produced in MS 2.0.3). See how difficult it is to select and highlight a rest in Voice 2 compared to a rest in voice 1.
Edit: Just worked out what the problem is. The hidden rests in the tablature line are overlapping the voice 2 rests in the pitched staff line. They are difficult to notice because you have to have "show invisible" on (in "View") and even then, they are very far out of position and obscured by other rests in the pitched staff
Attachment | Size |
---|---|
note_rests_in_voice_2.mscz | 26.85 KB |
note_rests_in_voice_2.xml | 133.11 KB |
Comments
Perhaps this should be a feature request: should there be some safeguard when importing tablature via MusicXML to ensure that rests are contained within the tablature staff rather than wandering onto the associated pitched staff?
I think it's a bug that the invisible rests are placed so far abovew the staff. I can't see any reaosn for it. Probably something in the MusicXML import code is misjudging things. and a user offset of -16sp is somehow being added to the vertical positions of all those rests. The rests on the standard staff are also moved lower for some reason - they should be below the center line, of course, but that is supposed to happen automatically, no need for user offset to be applied.
The attached MusicXML file uses display-step and display-octave to set the vertical position for the rests in the TAB staff. Unfortunately, the MusicXML documentation does not specify how to interpret these elements for a TAB staff.
MuseScore's MusicXML importer simply uses the pitchOffset value as defined for the TAB clef in the clefTable to calculate the vertical offset, which results in the value of -16 sp. See mscore/importmxmlpass2.cpp, function handleDisplayStep().
Once the required behaviour is defined, this is trivial to solve.
relates to #270643: [EPIC] MusicXML import/export issues