MSCX format: Better syntax for dynamics

• Nov 6, 2019 - 03:35
Reported version
3.x-dev
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

Current syntax

The MSCX syntax for a regular piano "p" dynamic is:

          <Dynamic>
            <subtype>p</subtype>
            <velocity>49</velocity>
            </Dynamic>

Within MuseScore, double-click on the dynamic and edit it to read "sempre p". The MSCX syntax becomes:

          <Dynamic>
            <subtype>other-dynamics</subtype>
            <velocity>49</velocity>
            <text><i>sempre </i><font face="ScoreText"/></text>
            </Dynamic>

Notice that:

  • The subtype has changed even though it is effectively still a "p" dynamic.
  • It is not possible to tell that the "p" symbol is included in the text.
  • There should be no need for the <i> (italics) formatting tag because it can be inherited from the Dynamics text style.

Proposal

We should consider following the MusicXML route and doing something like this instead:

          <Dynamic>
            <text>sempre </text>
            <p/>
            <velocity>49</velocity>
            </Dynamic>

You would carry on adding more <text>, <f/> and <p/> elements as necessary to construct more complicated dynamics. An ordinary "p" dynamic would be the same, just without the <text> tag.

Notice that:

  • The only difference between regular "p" and "sempre p" is the presence of the <text> tag.
  • There is no need for a <subtype> tag . The subtype can be found by adding up all the <f/> and <p/> tags.
  • The <i> (italics) tag has gone (it is not needed when the whole <text> element has the same formatting).

We could even put the <p/> tag inside the <text> tag, like this:

            <text>sempre <p/></text>

But care must be taken to avoid confusion when <b> and <i> are being used for text formatting.

We should also check out what MNX has to say on this matter once it has settled down.


Comments