frescobaldi / python-ly

A Python package and commandline tool to manipulate LilyPond files
https://pypi.org/project/python-ly
135 stars 33 forks source link

Spacer rests can confuse MusicXML export #27

Open uliska opened 9 years ago

uliska commented 9 years ago

Follow-up to #24:

When exporting the following file to MusicXML:

\score {
  <<
    \new Staff { s8*8 }
    \new Staff { c'1 }
  >>
}

the exported "P1" part contains eight empty measures, starting with

    <measure number="1">
      <attributes>
        <divisions>1</divisions>
        <time symbol="common">
          <beats>4</beats>
          <beat-type>4</beat-type>
        </time>
        <clef>
          <sign>G</sign>
          <line>2</line>
        </clef>
      </attributes>
      <forward>
        <duration>0</duration>
      </forward>
    </measure>
    <measure number="2">
      <forward>
        <duration>0</duration>
      </forward>
    </measure>

and the remaining measures being identical with "2"

uliska commented 9 years ago

After #26 being fixed I can see that the empty measures are really empty. When re-importing to LilyPond you can see that the middle staves are empty while they actually should have appropriate spacer rests to keep the staves alive. Options would be s8*6 or s2. ferneyii-2