lilypond-user
[Top][All Lists]
Advanced

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

Re: Altered volta labels


From: Ralph Palmer
Subject: Re: Altered volta labels
Date: Mon, 11 Jun 2018 08:02:58 -0400

On Sun, Jun 10, 2018 at 10:02 PM Aaron Hill <address@hidden> wrote:
On 2018-06-10 17:44, Ralph Palmer wrote:

> I would like to change the labels on a set of volta alternatives. I've
> tried using
> Volta text markup using repeatCommands
> <http://lsr.di.unimi.it/LSR/Item?id=316> [0.10714]
> from the LSR, but I can't seem to get it to work correctly.

Hi Ralph,

The LSR snippet you mentioned still works just fine in 2.19.81.  If you
would post an example of how you have tried to use it, we may be better
able to help you track down what isn't working for you.

Now, since setting repeat commands can be a little tedious, I have been
using the following helper functions since 2.10.33, with minor
alterations over the years:

%%%%
   \version "2.19.81"

   startRepeat = \set Score.repeatCommands = #'(start-repeat)
   startVolta = #(define-music-function (text) (markup?)
     #{ \set Score.repeatCommands = #(list (list 'volta text)) #})
   changeVolta = #(define-music-function (text) (markup?)
     #{ \set Score.repeatCommands = #(list '(volta #f) 'end-repeat (list
'volta text)) #})
   endVolta = \set Score.repeatCommands = #'((volta #f))
   endVoltaStartRepeat = \set Score.repeatCommands = #'((volta #f)
start-repeat)
   endRepeat = \set Score.repeatCommands = #'(end-repeat)

   \relative c'' {
     \startRepeat
       f4 g a b |
     \startVolta \markup \text \small "1, 2, 3, etc."
       g4 a g a |
       c1 |
     \changeVolta \markup \text \small "Last time"
       b4 a g f |
     \endVolta
       e1 \bar "|." |
   }
%%%%

NOTE: I included \endVoltaStartRepeat and \endRepeat, but they were
unneeded for the example.

-- Aaron Hill

​Thanks, Aaron - 

It works beautifully, and the set of commands should be very helpful!

I'm not surprised that the LSR snippet works in 2.19.81. I'm certain my difficulty relates to my unfamiliarity with Scheme and with the way Scheme operates with LilyPond functions and commands. And, in fact, exactly how LilyPond functions and commands relate to each other, especially in areas I'm not familiar with. I need to study more.

All the best,

Ralph​


--
Ralph Palmer
Brattleboro, VT
USA
address@hidden

reply via email to

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