lilypond-user
[Top][All Lists]
Advanced

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

Alternative bars in the middle of measure


From: Sven Axelsson
Subject: Alternative bars in the middle of measure
Date: Tue, 6 Sep 2016 17:24:33 +0200

Hello Lilyponders!

For the kind of music I mostly typeset, it is common to have alternative bars or even alternative notes in the middle of a measure. At the moment I handle this by setting score.repeatCommands like so:

% Used when substituting a single bar or just a few notes to show alternative.
altBracket = #(define-music-function (parser location tag) (string?)
  #{ \set Score.repeatCommands = #(list (list 'volta (markup #:text tag))) #})

% End previous altBracket thingy.
altBracketEnd = { \set Score.repeatCommands = #'((volta #f)) }

And use it like:

... music
\altBracket "1."
music
\altBracket "2."
music
\altBracketEnd

This works, but the result looks a bit different from \repeat volta ... \alternative

I'd appreciate any hints on how to get the same font and bracket look as with \repeat volta.

Thanks,
Sven Axelsson

--
++++++++++[>++++++++++>+++++++++++>++++++++++>++++++
>++++<<<<<-]>++++.+.++++.>+++++.>+.<<-.>>+.>++++.<<.
+++.>-.<<++.>>----.<++.>>>++++++.<<<<.>>++++.<----.

reply via email to

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