Next: Paired substitution functions, Previous: Overview of music functions, Up: Music functions
Here is a simple example,
padText = #(define-music-function (parser location padding) (number?) #{ \once \override TextScript #'padding = #$padding #}) \relative c''' { c4^"piu mosso" b a b \padText #1.8 c4^"piu mosso" d e f \padText #2.6 c4^"piu mosso" fis a g }
Music expressions may be substituted as well,
custosNote = #(define-music-function (parser location note) (ly:music?) #{ \once \override Voice.NoteHead #'stencil = #ly:text-interface::print \once \override Voice.NoteHead #'text = \markup \musicglyph #"custodes.mensural.u0" \once \override Voice.Stem #'stencil = ##f $note #}) { c' d' e' f' \custosNote g' }
Multiple variables may be used,
tempoMark = #(define-music-function (parser location padding marktext) (number? string?) #{ \once \override Score . RehearsalMark #'padding = $padding \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0) \mark \markup { \bold $marktext } #}) \relative c'' { c2 e \tempoMark #3.0 #"Allegro" g c }
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.