X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Fregression%2Fapply-output.ly;h=1ace6dc24f0f167b16808778213fcb586f387ca9;hb=1ee79e6b8d4386a5885960a3eafb87db933d7f63;hp=f2458f2c13bd3c20cf3a7004e011f0bad1199684;hpb=05fabaaf86fd44f9bd903f282bb98d343a991e40;p=lilypond.git diff --git a/input/regression/apply-output.ly b/input/regression/apply-output.ly index f2458f2c13..1ace6dc24f 100644 --- a/input/regression/apply-output.ly +++ b/input/regression/apply-output.ly @@ -1,51 +1,47 @@ +\version "2.11.51" -\version "2.1.21" \header { - -texidoc = "The @code{\applyoutput} expression is the most flexible way to + texidoc = "The @code{\applyOutput} expression is the most flexible way to tune properties for individual grobs. Here, the layout of a note head is changed depending on its vertical position. " +} +\layout { + ragged-right = ##t } -#(define (mc-squared gr org cur) +#(define (mc-squared gr org cur) (let* - ( - (ifs (ly:get-grob-property gr 'interfaces)) - (sp (ly:get-grob-property gr 'staff-position)) - ) - (if (and (memq 'note-head-interface ifs) - (memq sp '(-2 -3 -5))) - (begin - (ly:set-grob-property! gr 'print-function brew-new-markup-molecule) - (ly:set-grob-property! gr 'font-family 'roman) - (ly:set-grob-property! - gr 'text - (make-raise-markup -0.5 - (case sp - ((-5) (make-simple-markup "m")) - ((-3) (make-simple-markup "c ")) - ((-2) (make-smaller-markup (make-bold-markup "2"))) - (else (make-simple-markup "bla")) - )))) - ))) - -\score { - -\notes \context Voice \relative c' { - \stemUp - \property Voice.autoBeaming = ##f - { 8 - \context Voice \applyoutput #mc-squared - - - } - - } -\paper { raggedright = ##t -% outputscale = 5 - } + ( + (ifs (ly:grob-interfaces gr)) + (sp (ly:grob-property gr 'staff-position)) + ) + (if (memq 'note-head-interface ifs) + (begin + (ly:grob-set-property! gr 'stencil ly:text-interface::print) + (ly:grob-set-property! gr 'font-family 'roman) + (ly:grob-set-property! gr 'text + (make-raise-markup -0.5 + (case sp + ((-5) (make-simple-markup "m")) + ((-3) (make-simple-markup "c ")) + ((-2) (make-smaller-markup (make-bold-markup "2"))) + (else (make-simple-markup "bla")) + )))) + ))) + +\context Voice \relative c' { + \stemUp + \set autoBeaming = ##f + + { 8 + + \applyOutput #'Voice #mc-squared + + } } + +% EOF