lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue with deep-copy/map-some-music a tuplet


From: Paolo Prete
Subject: Re: Issue with deep-copy/map-some-music a tuplet
Date: Sun, 25 Dec 2022 13:02:11 +0100

Hi Harm,

I deleted that character, but the error remains (it doesn't compile on
2.25.0 but it compiles on all the previous versions). I tested it on Linux
(Ubuntu 22.04)

thanks
Paolo

On Sun, Dec 25, 2022 at 12:32 PM Thomas Morley <thomasmorley65@gmail.com>
wrote:

> Hi Paolo,
>
> the culprit is a non-breakable space character.
> Delete it.
>
> Am Sa., 24. Dez. 2022 um 20:20 Uhr schrieb Paolo Prete <
> paolopr976@gmail.com>:
> >
> > Hello,
> >
> > I just noticed an inconsistent behavior with 2.25.0. The snippet below
> > doesn't compile; I don't know if there is a hidden problem inside it, but
> > it worked for all the versions prior to 2.25:
>
> Nope, on my machine it failed for all versions.
>
> >
> > %-------------------------------------------------------------------
> >
> > test = #(define-music-function (parser location music) (ly:music?)
> > (let
> >   ((musiccpy '()))
> >   (begin
> >
> >     (set! musiccpy (ly:music-deep-copy music))
> >
> >     (map-some-music (lambda (evt)
> >       (let ((nameUp (ly:music-property evt 'name)))
> >         (cond
> >           ((eq? nameUp 'NoteEvent)
> >               (set! evt '())
> >             evt)
> >           (else #f))
> >         ))
> >     musiccpy)
> >
> >  );; Here, right before the bracket
> > #{ $musiccpy #}))
> >
> > {
> >   \test { \tuplet 3/2 { e'8 s  s } }
> > }
> >
> > %-------------------------------------------------------------------
> >
> > Some observations:
> >
> > 1) the snippet compiles if the tuplet is removed
> > 2) the snippet compiles if map-some-music is don on $music, instead of
> > $musiccpy
>
> Can't confirm, see above.
>
> >
> > I don't know if it's a bug, but in any case, is there a way/workaround to
> > fix it while preserving both ly:music-deep-copy and the tuplet?
> >
> > Thanks and Merry Christmas!
> >
> > Paolo
>
> Cheers,
>   Harm
>
> P.S.
> I take the code as a stripped down version of something larger, thus I
> don't comment on the coding itself
>


reply via email to

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