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]

Esta página corresponde a LilyPond-2.11.58 (rama de desarrollo).

Informe de los fallos a través de la lista en español lilypond-es, o en inglés a través de http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.

Se agradecen las sugerencias para la documentación.