1 \header { texidoc = "LilyPond syntax can be used inside scheme to
2 build music expressions, with the @code{#@{ ... #@}} syntax.
3 Scheme forms can be introduced inside these blocks by escaping
4 them with a @code{$}, both in a LilyPond context or in a Scheme
7 In this example, the @code{\withpaddingA}, @code{\withpaddingB} and
8 @code{\withpaddingC} music functions set different kinds of padding on
9 the @code{TextScript} grob.
16 \layout { ragged-right = ##t }
18 withPaddingA = #(define-music-function (parser location padding music) (number? ly:music?)
19 #{ \override TextScript #'padding = #$padding
21 \revert TextScript #'padding #})
23 withPaddingB = #(define-music-function (parser location padding music) (number? ly:music?)
24 #{ \override TextScript #'padding = #$(* padding 2)
26 \revert TextScript #'padding #})
28 withPaddingC = #(define-music-function (parser location padding music) (number? ly:music?)
29 #{ \override TextScript #'padding = #(+ 1 $(* padding 2))
31 \revert TextScript #'padding #})