lilypond-user
[Top][All Lists]
Advanced

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

Re: variable of type finger


From: David Kastrup
Subject: Re: variable of type finger
Date: Mon, 25 Jun 2018 22:44:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Gianmaria Lari <address@hidden> writes:

> On Mon, 25 Jun 2018 at 15:49, David Kastrup <address@hidden> wrote:
>
>> Gianmaria Lari <address@hidden> 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 .

>> > 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.

-- 
David Kastrup



reply via email to

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