lilypond-user
[Top][All Lists]
Advanced

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

Re: Markup for repeated notes or phrases


From: David Kastrup
Subject: Re: Markup for repeated notes or phrases
Date: Fri, 13 Nov 2015 12:47:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Gilles THIBAULT <address@hidden> writes:

>> And let's say I want to add fingering instructions, but only to the
>> first <c e> <d f>, as if I had written
>> 
>> \relative c' { <c-1 e-3>8 <d-2 f-4>8 <c e>8 <d f>8 <c e>8 <d f>8 <c e>8
>> <d f>8 }
>> 
>
> Sorry to answer so late.
> This snippet can perhaps make your life easier :
>   http://lsr.di.unimi.it/LSR/Item?id=768
> But it will not work as you expect if you use \repeat. I often use a function 
> like that, instead :
> %------------------
> nCopy = #(define-music-function (parser location n music)(integer? ly:music?)
> (cond
>   ((> n 1)(make-sequential-music 
>             (map (lambda (x)(ly:music-deep-copy music))
>                  (make-list n))))
            (ly:music-deep-copy (make-sequential-music (make-list n music)))

will work fine I think.

However, it will not likely work well in \relative mode, so you probably
should write

  (make-relative (music) music
    (ly:music-deep-copy (make-sequential-music (make-list n music))))

-- 
David Kastrup



reply via email to

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