[ << Interfaces for programmers ] | [Top][Contents][Index] | [ LilyPond Scheme interfaces >> ] |
[ < Void music functions ] | [ Up : Interfaces for programmers ] | [ Markup functions > ] |
2.4 Event functions
To use a music function in the place of an event, you need to write a
direction indicator before it. But sometimes, this does not quite match
the syntax of constructs you want to replace. For example, if you want
to write dynamics commands, those are usually attached without direction
indicator, like c'\pp
. Here is a way to write arbitrary
dynamics:
dyn=#(define-event-function (arg) (markup?) (make-dynamic-script arg)) \relative { c'\dyn pfsss }
You could do the same using a music function, but then you always would
have to write a direction indicator before calling it, like
c-\dyn pfsss
.