Next: , Previous: Void functions, Up: Music functions


6.1.6 Functions without arguments

In most cases a function without arguments should be written with an 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 (parser location) ()
   (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

Cette page documente LilyPond-2.11.58 (branche de développement).

Rapportez toute anomalie en français à lilypond-user-fr@gnu.org ou en anglais à http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs

Vos suggestions à propos de la documentation sont les bienvenues.