lilypond-user
[Top][All Lists]
Advanced

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

Re: A query about tablature


From: Jean Abou Samra
Subject: Re: A query about tablature
Date: Tue, 08 Aug 2023 20:02:25 +0200
User-agent: Evolution 3.48.4 (3.48.4-1.fc38)

Le mardi 08 août 2023 à 19:53 +0200, Lukas-Fabian Moser a écrit :
> Yes, sure, that's what I did in my code for Alasdair. But I was more 
> wondering whether or not RhythmicStaves (RhythmicStaff's?) should do 
> this automatically.
> 
> By the way, I didn't know about music-clone. What's its advantage over 
> ly:music-deep-copy?

As far as I understand the docstring,

(music-clone mus 'elements new-elts)

is more efficient than

(let ((new-mus (ly:music-deep-copy mus)))
  (ly:music-set-property! new-mus 'elements new-elts)
  new-mus)

because it will avoid deeply copying the elements list and
all its elements, by noticing that it will be overridden
by new-elts anyway.

Without extra arguments, (music-clone m) should be strictly
equivalent to (ly:music-deep-copy m).



Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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