w3c / musicxml

MusicXML specification
479 stars 56 forks source link

`enclosure` attribute problems in `<direction>` #519

Open lemzwerg opened 1 month ago

lemzwerg commented 1 month ago

IMHO, the current situation with the enclosure attribute within <direction> is ... suboptimal in MusicXML, to say it politely.

  1. Because various <direction-type> elements can be grouped together, the decision that only some children have an enclosure attribute looks arbitrary. For example, I can have a boxed 'molto f', but I cannot have a boxed coda sign (for example, to construct a boxed version of image

  2. It is undefined whether consecutive elements that have the enclosure attribute set are put together into a single box or not; see #518 for examples.

As a remedy for item 1, please either add more enclosure attributes to <direction-type> children or document the intended usage of the elements so that it is clear from the description why it doesn't have this attribute.

For item 2 I'm waiting for @mscuthbert's forthcoming proposal of an enclosure-break attribute :slightly_smiling_face:

Regarding a boxed 'molto f': code like

<direction>
  <direction-type>
    <words enclosure="rectangle">molto </words>
  </direction-type>
  <direction-type>
    <dynamics>
      <f/>
    </dynamics>
  </direction-type>
</direction>

fails completely in pre-4.4.0 MuseScore: image and Finale 27 cannot correctly cope with the 'rectangle' value: image