lilypond-user
[Top][All Lists]
Advanced

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

Re: Howto have the number of volte printed out above an end-repeat bar?


From: Gilles Filippini
Subject: Re: Howto have the number of volte printed out above an end-repeat bar?
Date: Tue, 12 Oct 2010 01:00:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100913 Iceowl/1.0b1 Icedove/3.0.7

Vicente Solsona a écrit , Le 11/10/2010 23:57:
> On Mon, 11 Oct 2010 21:40:30 +0200, Gilles Filippini
> <address@hidden> wrote:
>> To me the "standard" way would be to have the Volta_engraver doing this
>> for me, and taking care not to do it when inside \unfoldrepeats {}.
> 
> afaik \unfoldRepeats is intended mainly for the output...
> 
> maybe you could just override the visibility of the mark when using
> \unfoldRepeats:

That can't be used with a voice which includes several repeats and / or
rehearsal marks.

I thought I could trigger the mark using a function and a global
variable, but that doesn't work as expected. It seems the function is
evaluated only once while setting the "toto" part instead of being
evaluated in the context of each score:

%-------------------
repeatMark =
#(define-music-function
     (parser location volte)
     (number?)
     (if repeat-mark-visible
   #{
     \once \override Score.RehearsalMark #'break-visibility =
#begin-of-line-invisible
     \once \override Score.RehearsalMark #'self-alignment-X = #RIGHT
     \once \override Score.RehearsalMark #'font-size = #0
     \mark \markup $(string-join (list "repeat" (number->string volte)
"times"))
   #}
   #{ #}
   ))

toto = \relative c'' {
  \mark \default
  d1
  \mark \default
  \repeat volta 3 {
    c b
  }
  \repeatMark #3
  a
  \mark \default
  g
}

#(define repeat-mark-visible #t)
\score {
  \toto
}

#(define repeat-mark-visible #f)
\score {
  \unfoldRepeats {
    \toto
  }
}
%-------------------

Looking for another method :/

Thanks,

_g.



reply via email to

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