lilypond-user
[Top][All Lists]
Advanced

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

Re: Note head as a custom image chosen according to note duration


From: Jean Faure
Subject: Re: Note head as a custom image chosen according to note duration
Date: Wed, 30 Nov 2022 16:50:25 +0100

Ah ok, thanks. Is there a way of keeping the original note heads, just superimpose them with a custom image?


On Wed, Nov 30, 2022 at 4:39 PM Jean Abou Samra <jean@abou-samra.fr> wrote:
Le 30/11/2022 à 16:34, Jean Faure a écrit :
> Just for a test, I changed all image filenames to note4.eps. However,
> it turned out that the custom image is scaled differently depending on
> duration-log. Why?
> I attach the lily, eps and output pdf files.



The code reads:

               #(case (ly:grob-property grob 'duration-log)
                  ;; whole note:
                  ((0) #{ \markup \epsfile #X #2 "note4.eps" #})
                  ;; half note:
                  ((1) #{ \markup \epsfile #X #3 "note4.eps" #})
                  ;; quarter note and shorter:
                  ((2) #{ \markup \epsfile #X #4 "note4.eps" #}))



The values #2, #3 and #4 are the scaling factors. My original intent was
to make them different to clarify that you could use any scaling you
liked for each image.

Best,
Jean


reply via email to

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