Next: , Previous: Simple substitution functions, Up: Music functions


6.1.3 Paired substitution functions

Some \override commands require a pair of numbers (called a cons cell in Scheme). To pass these numbers into a function, either use a pair? variable, or insert the cons into the music function.

     manualBeam =
     #(define-music-function (parser location beg-end)
                             (pair?)
     #{
       \once \override Beam #'positions = #$beg-end
     #})
     
     \relative {
       \manualBeam #'(3 . 6) c8 d e f
     }

or

     
     manualBeam =
     #(define-music-function (parser location beg end)
                             (number? number?)
     #{
       \once \override Beam #'positions = #(cons $beg $end)
     #})
     
     \relative {
       \manualBeam #3 #6 c8 d e f
     }

[image of music]

Diese Seite ist für LilyPond-2.11.58 (Entwicklungszweig).

Fehler bitte an http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs melden.

Ihre Vorschläge für die Dokumentation sind willkommen.