lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Repeat with alternatives [solved]


From: Thomas Morley
Subject: Re: Repeat with alternatives [solved]
Date: Tue, 13 Oct 2015 11:32:51 +0200

2015-10-13 3:18 GMT+02:00 David Wright <address@hidden>:
> Quoting address@hidden (address@hidden):
>
>> I’m trying to write a piece that has repeats with alternatives. It seems 
>> that “
>> \repeat volta 2” is the way to go with supplying the alternatives in “\
>> alternative”. However, this seems to work only for alternative endings, 
>> while I
>> have alternative middle parts.
>
> Hi again, thanks to 
> http://lists.gnu.org/archive/html/lilypond-user/2015-10/msg00399.html
> I can now close the volta bracket with this undocumented feature,
> \allowVoltaHook, thus avoiding inkscape postprocessing.
>
> Be aware, however, that \allowVoltaHook is global and unresettable,
> at least at the level of \score. (I don't use \book myself.)

Apart from being listed in available music-functions there is indeed
no documentation for `allowVoltaHook' and it is indeed global and
unresettable.
Probably best to changed it into a property. Another entry on my
(very) long TODO-list.

To get around the problem of `allowVoltaHook' being global you could
define a new bar-line (basically renaming):

\version "2.18.2"

#(define-bar-line "|-b" "|" #f "|")
\allowVoltaHook "|-b"

\relative {
  \override Score.VoltaBracket.shorten-pair = #'(0.2 . 0.2)
  c'1
  \set Score.repeatCommands = #'((volta "1a"))
  d1
  \bar "|-b"
  \set Score.repeatCommands = #'((volta #f) (volta "2a"))
  e1
  \set Score.repeatCommands = #'((volta #f))
  \bar "|-b"


  c'1
  \set Score.repeatCommands = #'((volta "2a"))
  d
  \set Score.repeatCommands = #'((volta #f) (volta "2b"))
  e
  \set Score.repeatCommands = #'((volta #f))
}


>
> I've also tidied up the code I sent previously, getting rid of the
> warning by removing the redundant (volta #f). Staff, \score and \time
> are also not required as they only redefine the defaults.
> Score.VoltaBracket.shorten-pair might be useful too. I've tried to
> indicate that the barlines both *terminate* the alternative part-
> measures by shifting the hooks.
>
> (I'm not convinced that part-measures are a good idea, but that's not
> my call.)
>
> Cheers,
> David.
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]