[ << Interfaces for programmers ] | [Top][Contents][Index] | [ LilyPond Scheme interfaces >> ] |
[ < Mathematics in functions ] | [ Up : Music functions ] | [ Void music functions > ] |
2.3.6 Functions without arguments
In most cases a function without arguments should be written with a variable,
dolce = \markup{ \italic \bold dolce }
However, in rare cases it may be useful to create a music function without arguments,
displayBarNum = #(define-music-function () () (if (eq? #t (ly:get-option 'display-bar-numbers)) #{ \once \override Score.BarNumber.break-visibility = ##f #} #{#}))
To actually display bar numbers where this function is called,
invoke lilypond
with
lilypond -d display-bar-numbers FILENAME.ly
[ << Interfaces for programmers ] | [Top][Contents][Index] | [ LilyPond Scheme interfaces >> ] |
[ < Mathematics in functions ] | [ Up : Music functions ] | [ Void music functions > ] |