Vicente Solsona a écrit , Le 11/10/2010 23:57:
> On Mon, 11 Oct 2010 21:40:30 +0200, Gilles Filippini
> <gilles.filipp...@free.fr> 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.

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to