lilypond-user
[Top][All Lists]
Advanced

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

Re: Shortcut for epeated chords?


From: papa.eric
Subject: Re: Shortcut for epeated chords?
Date: Fri, 28 Mar 2008 15:02:31 +0100
User-agent: RoundCube Webmail/0.1b

\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 <address@hidden> 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






reply via email to

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