grame-cncm / libmusicxml

A C/C++ library to support the MusicXML format.
Mozilla Public License 2.0
152 stars 33 forks source link

When there are multiple voices, the repeat label will display abnormally at the end #55

Closed zhwei8090 closed 2 years ago

zhwei8090 commented 2 years ago

test4.xml.zip Correct effect: image

image

{[ \staff<1> \set<autoHideTiedAccidentals="on"> \auto<autoInstrPos="on"> \instr<"Piano"> \accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2"> 
   (* meas. 1 *)  \clef<"g2"> \key<0> \meter<"3/8", autoBarlines="off", autoMeasuresNum="system"> _/16 _/16 _/8 _/8 \bar<measNum=2> 
   (* meas. 2 *)  \stemsDown \beamsOff c2/4. \repeatEnd ]
 , 
[ \staff<1> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="1"> 
   (* meas. 1 *)  empty/4 empty/8 \bar<measNum=2> 
   (* meas. 2 *)  \repeatEnd empty*3/8 ]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \staffFormat<distance=13> \clef<"f4"> \key<0> \meter<"3/8", autoBarlines="off", autoMeasuresNum="system"> \stemsUp \beamsOff c1/8 _/8 _/8 \bar<measNum=2> 
   (* meas. 2 *)  _*3/8 \repeatEnd ]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \staffFormat<distance=13> \stemsDown \beamsOff c1/4. \bar<measNum=2> 
   (* meas. 2 *)  \repeatEnd empty*3/8 ]
  }
zhwei8090 commented 2 years ago

I'm sure it's caused by multiple voices, but I don't know how to fix it

arshiacont commented 2 years ago

This looks like a GuidoLib issue @dfober ?

zhwei8090 commented 2 years ago

that's right:

{[ \staff<1> \set<autoHideTiedAccidentals="on"> \auto<autoInstrPos="on"> \instr<"Piano"> \accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2"> 
   (* meas. 1 *)  \clef<"g2"> \key<0> \meter<"3/8", autoBarlines="off", autoMeasuresNum="system"> _/16 _/16 _/8 _/8 \bar<measNum=2> 
   (* meas. 2 *)  \stemsDown \beamsOff c2/4. \repeatEnd ]
 , 
[ \staff<1> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="1"> 
   (* meas. 1 *)  empty/4 empty/8 \bar<measNum=2> 
   (* meas. 2 *)   empty*3/8 \repeatEnd]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \staffFormat<distance=13> \clef<"f4"> \key<0> \meter<"3/8", autoBarlines="off", autoMeasuresNum="system"> \stemsUp \beamsOff c1/8 _/8 _/8 \bar<measNum=2> 
   (* meas. 2 *)  _*3/8 \repeatEnd ]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \staffFormat<distance=13> \stemsDown \beamsOff c1/4. \bar<measNum=2> 
   (* meas. 2 *)   empty*3/8 \repeatEnd]
  }
zhwei8090 commented 2 years ago

image

zhwei8090 commented 2 years ago

Just make sure the bar where the repeat label appears is multi-voice