grame-cncm / guidolib

Guido project - music score layout engine - music description language
http://guido.grame.fr
Mozilla Public License 2.0
152 stars 34 forks source link

I found an interesting problem, I don't know if you have encountered it #144

Closed zhwei8090 closed 2 years ago

zhwei8090 commented 2 years ago

The rising and falling marks in the score will be repeated in the bar, and the ideal effect is to appear once in the bar.

actual effect: image

ideal effect: image

zhwei8090 commented 2 years ago

test.xml.zip

arshiacont commented 2 years ago

can you post the resulting GMN (and reduce it to the strict minimum)? Use https://guidoeditor.grame.fr/ for that.

zhwei8090 commented 2 years ago

@arshiacont This is the smallest gmn I can reproduce the problem


{[ \staff<1> \set<autoHideTiedAccidentals="on"> \staffFormat \title<"(三)自选曲目
1.F大调旋律"> \composer<"鲁宾斯坦", dy=4hs> \auto<autoInstrPos="on"> \instr<"钢琴"> \accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2"> 
   (* meas. 1 *)  \clef<"g2"> \key<-1> \meter<"2/4", autoBarlines="off", autoMeasuresNum="system"> \intens<"p", dy=-3.2hs> \tempo<"[1/4] = 88", dy=1.6hs> \tempo<"-104",fsize=12pt, dy=-4hs> \stemsUp \slurBegin:1<curve="down"> \beamsOff \fingering<text="3", dy=10.6hs>( c/4)
 \stemsUp \beamBegin:1 \acc( b0/8)
 \stemsUp c1/8 \slurEnd:1 \beamEnd:1 \bar 
   (* meas. 2 *)  \stemsUp \slurBegin:1<curve="down"> \beamsOff \fingering<text="3", dy=10.6hs>( c/4)
 \stemsUp \beamBegin:1 \fingering<text="2", dy=9.6hs>( \acc( b0/8)
)
 \stemsUp \fingering<text="1", dy=10.6hs>( c1/8)
 \slurEnd:1 \beamEnd:1 \bar 
   (* meas. 3 *)  \crescBegin<dy=-1.6hs> \stemsUp \slurBegin:1<curve="down"> \beamsOff \fingering<text="3", dy=10hs>( f/4)
 \stemsUp \beamBegin:1 \fingering<text="2", dy=10.6hs>( e/8)
 \crescEnd<dy=13hs> \stemsUp \fingering<text="1", dy=10hs>( f/8)
 \beamEnd:1 \bar 
   (* meas. 4 *)  \stemsDown \beamsOff \fingering<text="4", dy=3.6hs>( c2/2)
 \slurEnd:1 \bar 
   (* meas. 5 *)  \intens<"mf", dy=-2.6hs> \stemsDown \slurBegin:1<curve="up"> \beamsOff \fingering<text="3", dy=4.6hs>( b&1/4)
 \stemsUp \beamBegin:1 \fingering<text="2", dy=10hs>( a/8)
 \stemsUp \fingering<text="1", dy=10hs>( g/8)
 \slurEnd:1 \beamEnd:1 ]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \staffFormat<dy=-9.2> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \clef<"f4"> \key<-1> \meter<"2/4", autoBarlines="off", autoMeasuresNum="system"> \stemsUp \beamsOff \fingering<text="5", dy=11.6hs>( f-1/8)
 \stemsDown \beamsOff {\fingering<text="1", dy=14.6hs>( \fingering<text="2", dy=11hs>( \fingering<text="5", dy=-0.4hs>( c0/4)
)
)
, f/4, a/4  } \stemsDown \beamsOff {c/8, f/8, a/8  } \bar 
   (* meas. 2 *)  \stemsUp \beamsOff g-1/8 \stemsDown \beamsOff {c0/4, e/4, b&/4  } \stemsDown \beamsOff {c/8, e/8, b&/8  } \bar 
   (* meas. 3 *)  \stemsUp \beamsOff \fingering<text="5", dy=12.4hs>( a-1/8)
 \stemsDown \beamsOff {\fingering<text="1", dy=10hs>( \fingering<text="2", dy=13.2hs>( \fingering<text="4", dy=-1.4hs>( f0/4)
)
)
, a/4, c1/4  } \stemsDown \beamsOff {f0/8, a/8, c1/8  } \bar 
   (* meas. 4 *)  \stemsUp \beamsOff \fingering<text="5", dy=11.6hs>( \acc( f#-1/8)
)
 \stemsDown \beamsOff {\acc( f#0/4)
, a/4, \acc( e&1/4)
  } \stemsDown \beamsOff {\fingering<text="1", dy=15.8hs>( \fingering<text="2", dy=12hs>( \fingering<text="4", dy=0.6hs>( f#0/8)
)
)
, a/8, e&1/8  } \bar 
   (* meas. 5 *)  \stemsUp \beamsOff g-1/8 \stemsDown \beamsOff {g0/4, b&/4, d1/4  } \stemsDown \beamsOff {g0/8, b&/8, \acc( d&1/8)
  } ]
  }
arshiacont commented 2 years ago

@zhwei8090 please next time reduce the example to the strict minimum reproducible on Guido Online Editor. For this one, only one measure is enough. Also pay attention to Copy/Paste issues and use correct github formatting. I did everything this time for you but I won't do this every time! ;)

This is the minimal example:

{
[ \staff<1> \barFormat<style= "system", range="1-2">
\clef<"g2"> \key<-1> \meter<"2/4"> \intens<"p", dy=-3.2hs> \tempo<"[1/4] = 88", dy=1.6hs> 
\stemsDown  c2/2
\slurEnd:1 \bar
\beamsOff b&1/4
\stemsUp \beamBegin:1  a/8 g/8
\beamEnd:1 ]
,
[ \staff<2> 
 \clef<"f4"> \key<-1> \meter<"2/4"> 
 (* measure 1 *)
  \acc( f#-1/8)
 {\acc( f#0/4), a/4, \acc( e&1/4)} 
 { f#0/8, a/8, e&1/8 } \bar
(* measure 2*)
\stemsUp g-1/8 
\stemsDown {g0/4, b&/4, d1/4 } 
{g0/8, b&/8, \acc( d&1/8)} 
]
}

@dfober I believe something is happening here: problem happening on measure one, staff 2 (accidental being repeated).

Any idea?

dfober commented 2 years ago

A more minimal example:

{
[ 
    \barFormat<style= "system">
    \clef<"g2"> \key<-1> \meter<"2/4">
    c2/1
]
,
[ 
    \clef<"f4"> \key<-1> \meter<"2/4"> 
    f#-1/8
    { f#0/4, e&1 } 
    { f#0/8, e&1 } 

    g0/2
]
}

I had already seen that the problem disappears by removing the barformat. It disappears also by changing f#-1/8 to f#-1/16 (i.e. adding a note after the second chord) . On my side, nothing happens when removing one measure of the first staff... I'll have a look.

zhwei8090 commented 2 years ago

@arshiacont Sorry, this is my question, pay attention next time

dfober commented 2 years ago

fixed