Gilles THIBAULT <[email protected]> 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
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user