[Top][All Lists]

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

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

From: Paolo Prete
Subject: Issue with deep-copy/map-some-music a tuplet
Date: Sat, 24 Dec 2022 20:19:42 +0100


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:


test = #(define-music-function (parser location music) (ly:music?)
  ((musiccpy '()))

    (set! musiccpy (ly:music-deep-copy music))

    (map-some-music (lambda (evt)
      (let ((nameUp (ly:music-property evt 'name)))
          ((eq? nameUp 'NoteEvent)
              (set! evt '())
          (else #f))

#{ $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

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!


reply via email to

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