Hi Peter,
On Sun, Dec 2, 2012 at 2:36 PM, PMA <[email protected]> wrote:
> Hi List.
>
> I would like to alter this function...
>
> glissmove = {
> \once \override Glissando #'(bound-details left Y) = #1.3
> \once \override Glissando #'(bound-details right Y) = #1.3
> }
>
> to accept its 1.3 or whatever as an input parameter instead.
>
> I see docs on parameterizing Scheme functions, but not on
> doing this in LilyPond directly -- LP's param handing syntax.
> Have I overlooked something obvious?
>
Here you need to define a music function. Something like the following:
\version "2.16.1"
glissmove =
#(define-music-function (parser location left-Y right-Y)
(number? number?)
#{
\once \override Glissando #'(bound-details left Y) = #left-Y
\once \override Glissando #'(bound-details right Y) = #right-Y
#})
\relative c' {
\glissmove #1.3 #1.3 c2\glissando c'
}
Note that if you're using one of the newer development versions, you
can write the overrides with nicer-looking syntax:
glissmove =
#(define-music-function (parser location left-Y right-Y)
(number? number?)
#{
\once \override Glissando.bound-details.left.Y = #left-Y
\once \override Glissando.bound-details.right.Y = #right-Y
#})
There's plenty of documentation on writing music functions. See
http://www.lilypond.org/doc/v2.16/Documentation/extending/music-functions
Hope this helps,
David
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user