lilypond-user
[Top][All Lists]
Advanced

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

Re: Automatic repeat


From: David Kastrup
Subject: Re: Automatic repeat
Date: Mon, 13 Feb 2012 12:33:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Dan Israël <address@hidden> writes:

>   Hi,
>
> I am writing a piece with a rythmic staff under a melodic staff. I'd
> like that the rhythmic pattern (one bar)  repeats itself
> automatically, enough times in order to fit the length of the piece
> (as determined by the melodic staff)
>
> Thanks a lot  for your help !

rhythm = { \repeat unfold 2 { c8 \times 2/3 { c16 c c }} c8 c
           \repeat unfold 2 { c8 \times 2/3 { c16 c c }}
           \times 2/3 { c16 c c } \times 2/3 { c16 c c }}
melody = \relative c' { c2. d e f e d c d e f e d c c }

\new StaffGroup << \time 3/4
                  \new Staff \melody
                  \new RhythmicStaff \repeat unfold
                    $(ly:moment-main-numerator
                       (ly:moment-div (ly:music-length melody)
                                      (ly:music-length rhythm)))
                  \rhythm
                  >>

-- 
David Kastrup




reply via email to

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