lilypond-user
[Top][All Lists]
Advanced

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

Number Repeated Measures


From: musicologist1964
Subject: Number Repeated Measures
Date: Sun, 18 May 2008 03:51:34 -0700 (PDT)

Hi,

I wonder if anyone could offer me some help to improve the scheme function I
wrote below.  The function numberedRepeats works in a similar way to
"\repeat unfold", except it numbers the repeated measures without replacing
them with percent-like signs.  There is a problem, which I lack sufficient
knowledge of scheme to solve.  That is, the function only works in 4/4 time
because the line "\repeat percent $numberRpts s1" uses the "s1" as a spacer. 
I would like to use the length of the variable "theMusic" instead, so it
would work with an arbitrary time signature.

Many thanks in advance.

Garry :)


\version "2.11.45"

numberedRepeats = #(define-music-function (parser location numberRpts
theMusic )
                                          (                integer?  
ly:music?)
  #{
    <<
      \repeat unfold $numberRpts $theMusic
      { 
        \set countPercentRepeats = ##t
        \override PercentRepeatCounter #'Y-offset = 3
        \override PercentRepeatCounter #'font-size = 1
        \override PercentRepeat #'transparent = ##t 
        \repeat percent $numberRpts s1
      }
    >>
  #})

\new Staff
{
  \numberedRepeats #10 { c'4 c' c' c' }
}


-- 
View this message in context: 
http://www.nabble.com/Number-Repeated-Measures-tp17301495p17301495.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.





reply via email to

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