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? Thanks --- Gio 8/12/11, David Kastrup <d...@gnu.org> ha scritto: > Da: David Kastrup <d...@gnu.org> > Oggetto: Re: duration and pitch in a function > A: lilypond-user@gnu.org > Data: Giovedì 8 dicembre 2011, 07:59 > Paolo Prete <p4olo_pr...@yahoo.it> > writes: > > > I need to create a function that > > > > accepts some_pitch and some_duration as arguments and > prints the > > following three notes: > > > > 1) some_pitch with some_duration > > 2) some_pitch with some_duration*2 > > 3) some_pitch with some_duration*3 > > > > > > Should I use ly:duration as type of the argument two? > > ly:duration? would be the predicate. And yes, > definitely. > > > I can't find documentation for that. > > > > I use LilyPond 2.12.3 but I can upgrade it if > necessary... > > If you upgrade, you will find both the functionality itself > as well as > the documentation. > > I don't quite remember the version; it might be necessary > to take one of > the 2.15.x releases. > > -- > David Kastrup > > > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user