\repeat is nice for true repetitions, but if I have various patterns using the
same chord with different durations, and some ties or accents or different
beaming or slurs, it does not work. Only the notes (pitches) really are
repeated.
random example: c8 Y Y Y->~ | Y( Z) Z4_. | c8 X-> X_. X16 e16 | r8 ...
where X, Y and Z are big chords and there is no "true" pattern you could
generate just changing the pitches... and there are many different chords so
just putting X Y and Z in macros (\X ...) is not enough. How to not
cut-and-paste in that kind of situation? (the result is hard to read).
On Fri, 28 Mar 2008 14:36:50 +0100, Mats Bengtsson <[EMAIL PROTECTED]> wrote:
> If you find the \repeat unfold syntax too long to type in, you can easily
> defined a macro with a shorter name:
> rr = #(define-music-function (parser location num music)(number?
> ly:music?)
> #{ \repeat unfold $num $music #})
>
> The only complication is that you have to add a #-mark before the
> number that indicates the number of times the pattern should be repeated.
> Example:
>
> \relative c'{
> \rr #5 <c e g>4 \rr #2 c8 \rr #6 r4
> \rr #2 {c e d g, }
> }
>
> When it comes to extending the syntax, you have to be careful and think
> about
> all possible side effects before doing such a change.
>
> /Mats
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user