lilypond-user
[Top][All Lists]
Advanced

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

Re: Alternative bars in the middle of measure


From: Pierre Perol-Schneider
Subject: Re: Alternative bars in the middle of measure
Date: Tue, 6 Sep 2016 18:27:01 +0200

Hi Sven,

try to put 'number instead of 'text in your code:

altBracket = #(define-music-function (parser location tag) (string?)
  #{ \set Score.repeatCommands = #(list (list 'volta (markup #:number tag))) #})

Cheers,
Pierre

2016-09-06 17:24 GMT+02:00 Sven Axelsson <address@hidden>:
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

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

_______________________________________________
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]