[ << Interfaces for programmers ] | [Top][Contents][Index][ ? ] | [ LilyPond Scheme interfaces >> ] | ||
[ < Music function definitions ] | [ Up : Music functions ] | [ Simple substitution functions > ] |
2.3.2 Music function usage
Music functions may currently be used in several places. Depending on where they are used, restrictions apply in order to be able to parse them unambiguously. The result a music function returns must be compatible with the context in which it is called.
- At top level in a music expression. No restriction apply here.
-
As a post-event, explicitly started with a direction indicator (one of
-
,^
, and_
). Note that returning a post-event will be acceptable for music functions called as normal music, leading to a result roughly equivalent tos 1*0-\fun
In this case, you can’t use an open music expression as the last argument, one that would end with a music expression able to accept additional postevents.
-
As a chord constituent. The returned expression must be of
rhythmic-event
type, most likely aNoteEvent
.
The special rules for trailing arguments make it possible to write
polymorphic functions like \tweak
that can be applied to
different constructs.
[ << Interfaces for programmers ] | [Top][Contents][Index][ ? ] | [ LilyPond Scheme interfaces >> ] | ||
[ < Music function definitions ] | [ Up : Music functions ] | [ Simple substitution functions > ] |
他の言語: deutsch, español, français
About automatic language selection.