| [ << Interfaces for programmers ] | [Top][Contents][Index][ ? ] | [ LilyPond Scheme interfaces >> ] | ||
| [ < Scheme function definitions ] | [ Up : Scheme functions ] | [ Void scheme functions > ] | ||
2.2.2 Scheme function usage
Scheme functions can be called pretty much anywhere where a Scheme
expression starting with # can be written. You call a scheme
function by writing its name preceded by \, followed by its
arguments.
Apart from places where a Scheme value is required, there are a few
places where # expressions are accepted and evaluated for their
side effects but otherwise ignored. Mostly those are the places where
an assignment would be acceptable as well.
There are a few special places where an argument matching
ly:music? has to be either a music identifier or a music
expression enclosed in {…} or
<<…>> explicitly, so that possibly following
optional durations or postevents can’t be confused with additional
arguments. One obvious place is before a ly:duration?
predicate. Another is as the last argument of a scheme function when it
is used in a place where such optional parts could be considered either
part of the music argument or not.
In those rare cases, you have to delimit your music arguments appropriately to spare Lilypond from getting confused.
| [ << Interfaces for programmers ] | [Top][Contents][Index][ ? ] | [ LilyPond Scheme interfaces >> ] | ||
| [ < Scheme function definitions ] | [ Up : Scheme functions ] | [ Void scheme functions > ] | ||