[MusicXML import] wedge stop before wedge start

• Sep 9, 2019 - 13:53
Reported version
3.2
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
duplicate
Regression
No
Workaround
No
Project

Load 'wedgetest.mscz' and export it to musicxml. Look at the two wedges.
Import the exported musicxml file. You'll find that the first wedge is longer than before while the second wedge vanished. I append my musicxml export also.

The reason is that in musicxml the first wedge end (type="stop") is generated before the start (type="crescendo") appears.
After the start of wedge number 1 a second wedge start with the same number (type="diminuendo") is ignored and the second stop for wedge number 1 ends the first wedge.

The musical position of the first wedge start is defined by the second voice, while the end positon of this wedge is the end of the measure and could be inserted after the last note of the first voice:

<measure number="1" width="599.99">
      .
      .
      .
      <direction placement="below">
        <direction-type>
          <wedge type="stop" number="1"/>
          </direction-type>
        </direction>
       .
       .
       .
      <backup>
        <duration>8</duration>
        </backup>
       .
       .
       .
      <direction placement="below">
        <direction-type>
          <wedge type="crescendo" number="1" default-y="-75.00"/>
          </direction-type>
        </direction>
       .
       .
       . 
      </measure>
    <measure number="2" width="477.51">
       .
       .
       .
      <direction placement="below">
        <direction-type>
          <wedge type="diminuendo" number="1" default-y="-99.25"/>
          </direction-type>
        </direction>
       .
       .
       .
      <direction placement="below">
        <direction-type>
          <wedge type="stop" number="1"/>
          </direction-type>
        </direction>
       .
       .
       .
      </measure>
Attachment Size
wedgetest.mscz 5.14 KB
wedgetest.musicxml 11.98 KB

Comments

Title musicxml wedge stop before wedge start [MusicXML import] wedge stop before wedge start

MusicXML exported is correct, issue is on the import side (in MusicXMLParserDirection::direction(), which incorrectly requires the spanner start to have been read before spanner stop).

Hi Leon, you are right. Didn't know that. Thank you.

Found it in the musicxml spec: 'The values of start, stop, and continue refer to how an element appears in musical score order, not in MusicXML document order. An element with a stop attribute may precede the corresponding element with a start attribute within a MusicXML document.'