Mats Bengtsson wrote:
> 
> 
> -Eluze wrote:
>>
>>> I can use \bar "|:" ":|" for repeats, but I don't know how to set the
>>> alternate endings manually. Any hint?
>>>
>>>     
>>
>> you could add a further voice taking care of these repeats:
>>
>>       \\
>>       {
>>         \repeat volta 2 {
>>           s 1 s 1
>>         }
>>         \alternative {
>>           {s 1}
>>           {s 1}
>>         }
>>
>>
>>   
> That's in general a bad idea which may cause unexpected results, as has
> been discussed earlier on the mailing list. Remember that the general
> philosophy in LilyPond is that the input primarily describes the musical
> content, not the layout, so repeats should in general be included in
> every single voice, since the musical meaning of the repeat is that all
> the voices should be played twice. However, as an alternative to
> manually inserting the alternate endings and repeat signs, what you
> propose is certainly a better option.
> 

Hi Mats,

may I ask you why manually inserting the alternate endings and repeat
signs is not a good idea? It seems easier than adding a voice with
spacer rests..

I've found the commands here:
http://lilypond.org/doc/v2.13/Documentation/notation/Long-repeats#Manual-repeat-marks

It works (see attached example). I just get a warning:
"already have a volta spanner, ending that one prematurely"

What do you think about it?
\version "2.13.8"

\parallelMusic #'(VoiceA VoiceB) {
	% Bar 0
	s1 |
	s1 |
	
  % Bar 1
  \set Score.repeatCommands = #'(start-repeat)
  r4 g' c e ~ |
  c,1 |
  
  % Bar 2
  e4 g, c e ~ |
  b1 |
  
  % Bar 3
  % 1st alternative
  \set Score.repeatCommands = #'((volta "1"))
  e4 a, c e |
  a1 |
  \bar ":|"
  
  % Bar 4
  % 2nd alternative
  \set Score.repeatCommands = #'((volta "2"))
  a,1 |
  a1 |
  \set Score.repeatCommands = #'((volta #f))
  
  
}

\new StaffGroup <<
\new Staff { \clef "G_8" \relative c << \VoiceA \\ \VoiceB  >> }
\new TabStaff { \clef "moderntab" \relative c << \VoiceA \\ \VoiceB  >> }
>>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to