[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should \partial accept music instead of duration?
From: |
David Kastrup |
Subject: |
Re: Should \partial accept music instead of duration? |
Date: |
Sun, 27 Mar 2022 16:23:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Jean Abou Samra <jean@abou-samra.fr> writes:
> Le 26/03/2022 à 03:23, Kieren MacMillan a écrit :
>> Hope that makes it clearer?
>
>
> Yes, I understand better, thanks. I'd just suggest changing your
> snippet to
>
> \version "2.23.7"
>
> $(let ((notes (ly:music-property #{ <e f g a b c' d' e' f' g' a' b' c'
> d'> #} 'elements)))
> (make-sequential-music
> (map (lambda (x) (ly:music-deep-copy (list-ref notes (random
> (length notes)))))
> (iota 400))))
>
>
> with the essential change being the insertion of a
> ly:music-deep-copy so it does not share the same music
> objects for different notes, which could go wrong with
> the application of some music functions.
It doesn't share the same music objects for different notes since $(...)
makes a ly:music-deep-copy anyway that will deduplicate the elements of
SequentialMusic while copying them. The intermediate expression is
indeed not fit for every use, but the final deep copy fixes that.
--
David Kastrup
- Re: Should \partial accept music instead of duration?, (continued)
- Re: Should \partial accept music instead of duration?, Flaming Hakama by Elaine, 2022/03/20
- Re: Should \partial accept music instead of duration?, Valentin Petzel, 2022/03/24
- Re: Should \partial accept music instead of duration?, Carl Sorensen, 2022/03/24
- Re: Should \partial accept music instead of duration?, Valentin Petzel, 2022/03/24
- Re: Should \partial accept music instead of duration?, Carl Sorensen, 2022/03/25
- Re: Should \partial accept music instead of duration?, Kieren MacMillan, 2022/03/25
- Re: Should \partial accept music instead of duration?, Jean Abou Samra, 2022/03/25
- Re: Should \partial accept music instead of duration?, Kieren MacMillan, 2022/03/25
- Re: Should \partial accept music instead of duration?, Jean Abou Samra, 2022/03/27
- Re: Should \partial accept music instead of duration?, Kieren MacMillan, 2022/03/27
- Re: Should \partial accept music instead of duration?,
David Kastrup <=
- Re: Should \partial accept music instead of duration?, Jean Abou Samra, 2022/03/27
- Re: Should \partial accept music instead of duration?, David Kastrup, 2022/03/27