XML Export: <measure "width"=> attribute missing

Hi, long time Sibelius user just getting started with Dorico Pro 3.5, really enjoying most of it.
I’m trying export piano parts as XML for uploading to Piano Marvel, but I can’t seem to export any actual layout information. Most importantly, the <measure> element in the exported XML has no “width” attribute, so in PM the entire piece is displayed in about 2 CM of screen space.

Here’s an example of the beginning of a bar exported from Dorico:

  <part-list>
    <score-part id="P1">
      <part-name>Piano</part-name>
    </score-part>
  </part-list>
  <part id="P1">
    <measure number="1">
      <attributes>
        <divisions>4</divisions>
        <key number="1">
          <fifths>2</fifths>
          <mode>major</mode>
        </key>
        <key number="2">
          <fifths>2</fifths>
          <mode>major</mode>
        </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
        </time>
        <staves>2</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
        </clef>
        <clef number="2">
          <sign>F</sign>
          <line>4</line>
        </clef>
      </attributes>
      <note>
        <pitch>
          <step>A</step>
          <octave>4</octave>
        </pitch>
        <duration>8</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>1</staff>
      </note>

… and for comparison, here’s the same bar exported from MuseScore3

    <score-part id="P1">
      <part-name>Piano</part-name>
      <score-instrument id="P1-I1">
        <instrument-name></instrument-name>
        </score-instrument>
      <midi-device id="P1-I1" port="1"></midi-device>
      <midi-instrument id="P1-I1">
        <midi-channel>1</midi-channel>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    </part-list>
  <part id="P1">
    <measure number="1" width="209.02">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>21.00</left-margin>
            <right-margin>0.00</right-margin>
            </system-margins>
          <top-system-distance>170.00</top-system-distance>
          </system-layout>
        <staff-layout number="2">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>2</divisions>
        <key>
          <fifths>2</fifths>
          <mode>major</mode>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <staves>2</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
          </clef>
        <clef number="2">
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <harmony print-frame="no">
        <root>
          <root-step>D</root-step>
          </root>
        <kind>major</kind>
        </harmony>
      <note default-x="113.48" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="113.48" default-y="-25.00">
        <chord/>
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <harmony print-frame="no">
        <root>
          <root-step>G</root-step>
          </root>
        <kind>major</kind>
        </harmony>
      <note default-x="160.27" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="160.27" default-y="-20.00">
        <chord/>
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>8</duration>
        </backup>
      <note default-x="113.84" default-y="-125.00">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch> 
        <duration>2</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>

Note the presence of the <measure “width”=xxx> attribute. This is present in XML exports from Sibelius and MuseScore, but not from Dorico.
If I add “width” to all the measure elements in the Dorico XML, it is displayed correctly when imported.

Is there an option somewhere to include bar width and/or staff layout information in the export, or is it simply not implemented yet?

Thanks!

It is not implemented yet.

Ok, thank you.

We don’t have any specific plans to implement export of bar widths and other fixed measurements like that. It’s not a requirement that they should be included, and indeed Dorico doesn’t pay any attention to them when importing, and most applications seem to know what to do with music without that information being explicitly encoded. I’m curious what application you are importing into that does seem to need it?

1 Like

Hi Daniel,
I’m importing into Piano Marvel.
Just for fun, I imported the “Hello World” example from the w3c page plus an additional bar into Piano Marvel - it displayed as a single bar with two whole notes.
I’ll take the issue over to Piano Marvel’s support.
Thanks for responding and for all of your great work for the community.
Cheers,
Mike

This seems wise. It seems like piano marvel is trying to “cheat” (for wont of a better term) by relying on other program’s algorithms for deciding how to layout the music, rather than just implementing its own algorithm. (Easier said, than done, I know.)

TBH, I’m GLAD that dorico doesn’t mess with this. I want dorico to do its magic with layout, and not try and read other’s ideas about how the score should look. I also don’t see any really useful reason for dorico to export it either (your example, perhaps, excepting). I believe the overwhelming majority of people bring scores to dorico to make them look good, not the other way around.

MusicXML originated with Finale, which uses measure widths, and spaces beats proportionally within each bar. In its first versions the default approach to note spacing was more like hand-copying, with all bars the same width and linear spacing. One had to manually respace one or more bars (4-double-click with the Mass Mover tool, as I recall) to even gain the possibility of proportional spacing.

Sibelius and Dorico have never worked in terms of fixed measure widths, and in fact I don’t see any way for them to usefully interpret that information.