lilypond-user
[Top][All Lists]
Advanced

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

Re: duration and pitch in a function


From: David Kastrup
Subject: Re: duration and pitch in a function
Date: Thu, 08 Dec 2011 10:48:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Paolo Prete <address@hidden> writes:

> I searched in "extending" manual for 2.15, but I did not find a
> solution for my problem.

Please, *never*, *never*, *never* send a "courtesy copy" of a public
answer as a private mail when answering on a mailing list unless you
have been _explicitly_ asked to provide such a copy.

Otherwise, you set up _two_ different communication channels that the
person you are showing your "courtesy" then has to answer separately.
It is a great nuisance and additional work and hassle.

Paolo Prete <address@hidden> writes:

> I searched in "extending" manual for 2.15, but I did not find a
> solution for my problem.
>
> Shortly, given this fragment of code:
>
> ----------------------------------------
>
>
> myFunction  = #(define-music-function (parser location foobar) (ly:duration?)
> #{
>    a ...how_can_I_use_$foobar_as_duration_??...
> #})
>
> \new Staff \myFunction ...how_can_I_pass_duration_??...
>
>
> -----------------------------------------
>
>
> ...which is the right syntax and which version of lilypond could I use?

That _is_ the right syntax.  $foobar is a duration in #{ ... #}, and you
pass it by writing it down, as 2 or 2.. or 2.*3/2 or any other way of
writing a duration.

The first version where this would have been possible, judging from the
commit logs, would have been 2.15.6.  But there is little point in not
getting the current 2.15.x release instead.


-- 
David Kastrup




reply via email to

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