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 18:08:21 +0100

Hello Jean,

I just verified that 2.25 doesn't accept a tuplet of skips ( i.e:  \tuplet
3/2 {  s s s }, while all the previous versions do.
Is this really intended? I understand that a tuplet of skips doesn't
make sense in a score, but I believe it makes sense in a function.
I have some functions in my library that can obtain these tuplets as the
result of some processing and this causes troubles for me. Therefore I
wonder how I can get rid of the previous error.
In theory, I could transform a tuplet of 3/2 skips into a \scaleDurations
2/3 { s s s }, but how?

%-------------------------------------------------------------------

test = #(define-music-function (parser location music) (ly:music?)
(let
  ((musiccpy (ly:music-deep-copy music)))
  (map-some-music (lambda (evt)
    (let ((nameUp (ly:music-property evt 'name)))
      (cond
        ((eq? nameUp 'NoteEvent)
          (set! evt (make-music 'SkipEvent 'duration (ly:music-property evt
'duration)))
          evt)
        (else #f))
      ))
  musiccpy)

  ; how can I replace \tuplet 3/2 with \scaleDurations 2/3 in $musiccpy ?

#{ \displayLilyMusic $musiccpy #}))

{
  \test {  \tuplet 3/2 { e'8 s s }  }
}

%-------------------------------------------------------------------

Thanks very much for your help!


On Sun, Dec 25, 2022 at 1:30 PM Jean Abou Samra <jean@abou-samra.fr> wrote:

>
>
> Le 25/12/2022 à 13:27, Jean Abou Samra a écrit :
> > Le 25/12/2022 à 13:02, Paolo Prete a écrit :
> >> 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)
> >
> >
> > This is
> > https://gitlab.com/lilypond/lilypond/-/issues/6482
> >
> > Using \displayLilyMusic, you can see that your music ends up
> > equivalent to
> >
> > \tuplet 3/2 { s8 s }
> >
> > which is an unterminated tuplet.
>
> Actually this variant still compiles fine:
>
> \version "2.25.0"
>
> \tuplet 3/2 { s8 c'8 }
>
> so skips have something to do with it.
>


reply via email to

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