Response to MusicXML <direction> text objects

• Oct 8, 2021 - 18:48

This pertains to MuseScore's handling, in a MusicXML file, of <direction> elements of the <words> type, specifically as used by MuseScore for staff text items.

I note first that the provisions in MusicXML for describing the location of such text objects are "curious" (to be polite), and the MusicXML documentation leaves many questions unanswered about exactly how this is all expected to work.

That having been said, I note that MuseScore, exporting a MusicXML file from a score that includes staff text items, encodes them in what seem to be a very reasonable way.

But when importing a MusicXML file, the attributes that describe the exact location of the text object are completely ignored (other than for placement, which can have values of "above" and below). Regardless of the coordinate attributes that might be present (which, for a MusicXML file generated by MuseScore, it dutifully put in), it places the text left aligned with the left edge of the note that is encoded just after the encoding for the <direction>, and vertically, above or below the staff (as dictated by placement) at an arbitrary (but reasonable) elevation, but taking care to avoid conflict with any note heads or other items that might be in the neighborhood.

But it would be more desirable for MuseScore to respect the indications given by coordinate attributes in the MusicXML code, so as to place the text item in the reconstructed score where the original scorist had placed it in the original score.

One of many issues in doing so would be how MuseScore should respond to the curious element <directive>, which when "yes" changes how the coordinate attributes work in a most curious way.

Doug


Comments

> "But it would be more desirable for MuseScore to respect the indications given by coordinate attributes in the MusicXML code, so as to place the text item in the reconstructed score where the original scorist had placed it in the original score."
Chances are this is only true for scores exported by the same MuseScore version. After all other programs (or even other MuseScore version) have different default positions and musical fonts with different metrics for which that positional information is likely no longer valid after importing it into MuseScore.

Then again there might be some value in importing them as resetting them is fairly easy.

Actually, what MuseScore currently does when encountering a direction:words construct (my new nomenclature for such) in a MusicXML file is most often useful, even if it does not precisely reproduce the work of the originating scorist. And, as was aptly pointed out above, the receiving scorist can readily adjust the locations to taste. After all, she may not care for the originating scorist's precise style practices anyway.

And I note that the presence of the placement attribute ("above" vs. "below") in this part of the MusicXML syntax is said to be to allow a program that does not care to deal with the minutiae of location coordinate attributes (and that area is indeed "curious") to still place the text block in grossly the place intended by the originating scorist.

Doug

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