lilypond-user
[Top][All Lists]
Advanced

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

Re: concatenating notes with a music expression


From: Gianmaria Lari
Subject: Re: concatenating notes with a music expression
Date: Tue, 15 May 2018 18:40:18 +0200


On 15 May 2018 at 15:45, David Kastrup <address@hidden> wrote:
Gianmaria Lari <address@hidden> writes:

> On 15 May 2018 at 12:10, David Kastrup <address@hidden> wrote:
>
>> Malte Meyn <address@hidden> writes:
>>
>> > Am 15.05.2018 um 10:27 schrieb Gianmaria Lari:
>> >> Thank you Gilles!!!! I have yet a problem, how can engrave the foo
>> >> generated list in a score?
>> >
>> > You should make a music-function:
>> >
>> > \version "2.19.81"
>> >
>> > foo =
>> > #(define-music-function (seq1 seq2) (ly:music? ly:music?)
>> >    (make-sequential-music
>> >     (map (lambda (note)
>> >            (make-sequential-music
>> >             (cons note (ly:music-property seq2 'elements))))
>> >       (ly:music-property seq1 'elements))))
>> >
>> > seqI = { c b a }
>> > seqII = { f g }
>> >
>> > \foo \seqI \seqII
>>
>> Nope.  You need to write
>>
>> (ly:music-deep-copy (ly:music-property seq2 'elements))
>>
>> instead of
>> (ly:music-property seq2 'elements)

[...]

> David I copied and pasted you code but it didn't compile. I changed
> ly:music-properties to ly:music-property but it doesn't compile anyway.

Well, I used music-clone instead of ly:music-deep-copy for 'elements and
the former cannot deal with a list.  Sorry for that.  Try

fixed :) Thank you David it works perfectly.

I have one more question about how to split it in multiple score. But I'll open another thread.

reply via email to

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