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

Unwanted rendering Space in multi-voice score with Clef Change #138

Open arshiacont opened 2 years ago

arshiacont commented 2 years ago

Very simple example:

{[ \staff<1>  
   (* meas. 1 *)  \clef<"g2">  c/4 d/4 e/4  f/4  \bar 
   (* meas. 2 *)  
  \beamsOff g1/4 \clef<"f4"> 
  c1/4
  b0/4 
  a0/4 
 ]
 , 
[ \staff<1>  
   (* meas. 1 *)   empty/1  \bar
   (* meas. 2 *)  empty/1  ]
  }

leads to: image

The original example is severely simplified to be used as unit test. Ofcourse a score like above, by itself, does not make sense!

Note: If we remove the the second voice, it works (which is ofcourse not intended).

arshiacont commented 2 years ago

Important Note: The problem apparently comes from the \empty/1 in the second measure of the second voice. If we chop it so that it won't cover the entire measure it works:

{[ \staff<1>  
   (* meas. 1 *)  \clef<"g2">  c/4 d/4 e/4  f/4  \bar 
   (* meas. 2 *)  
  \beamsOff g1/4 \clef<"f4"> 
  c1/4
  b0/4 
  a0/4 
 ]
 , 
[ \staff<1>  
   (* meas. 1 *)   empty/1  \bar
   (* meas. 2 *)  empty/4
   empty/4
   empty/4
   empty/4]
  }

I will try to replicate this behavior in xml2guido!

@dfober if you think the above is intended behavior we can close this issue.