On Mon, 25 Jun 2018 at 22:44, David Kastrup <d...@gnu.org> wrote:

> Gianmaria Lari <gianmarial...@gmail.com> writes:
>
> > On Mon, 25 Jun 2018 at 15:49, David Kastrup <d...@gnu.org> wrote:
> >
> >> Gianmaria Lari <gianmarial...@gmail.com> writes:
> >>
> >> > This code define a variable containing a duration and the use it:
> >> >
> >> > \version "2.19.81"
> >> > #(define myDuration (ly:make-duration 4 0))
> >> > { a\myDuration}
> >> >
> >> >
> >> > I can do something similar wit fingering:
> >> >
> >> > \version "2.19.81"
> >> > myFinger = \finger "3"
> >> > { a\myFinger}
> >> >
> >> >
> >> > How can I rewrite the previous
> >> >
> >> > myFinger = \finger "3"
> >> >
> >> >
> >> > using a define and the scheme function that create a finger
> >> > articulation?
> >>
> >> #(define myFinger (finger "3"))
> >>
> >> It's sort of cheating since "finger" isn't really an actual Scheme
> >> function but since version 2.19.22 you can just call LilyPond's music
> >> functions and their ilk pretending that they are.
> >>
> >
> > Yes it's clear. Do you know where I can found the source code of finger
> > function?
>
> Like pretty much all music functions in ly/music-functions-init.ly .
>

Thank you!!!

>> > I hope I have been clear....
> >>
> >> Well, #{ \finger "3" #} works well enough anyway so it's not quite clear
> >> what you hope to achieve.
> >>
> >
> > It is just a curiosity. But I didn't understand how to use  #{ \finger
> "3"
> > #}. I made some try but I have not been able to compile it.
>
> So what try did you make?  #{ \finger "3" #} is a perfectly valid Scheme
> expression and should be compilable just fine wherever you can put
> Scheme expressions.
>
> For example, a LilyPond file looking like
>
> #(display #{ \finger "3" #})
>
> compiles just fine even if its output is not particularly legible.
>

The problem was " wherever you can put Scheme expressions".... I tried to
use it where lilypond expects lilypond code not scheme code.  Now it's
extremely perfectly clear :)

Thank you David!!!
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to