X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Fregression%2Fapply-output.ly;h=1ace6dc24f0f167b16808778213fcb586f387ca9;hb=fe21914f3e6a80b9c47a39b09a7f878d14f9940a;hp=cd4bf3728c03d712b8a108eb6dae1cd3704ba8e1;hpb=66331c5dd92bbe2926a8566e0a2defc4834b5967;p=lilypond.git diff --git a/input/regression/apply-output.ly b/input/regression/apply-output.ly index cd4bf3728c..1ace6dc24f 100644 --- a/input/regression/apply-output.ly +++ b/input/regression/apply-output.ly @@ -1,51 +1,47 @@ -#(ly:set-option 'old-relative) -\version "1.9.1" -\header { +\version "2.11.51" -texidoc = "The @code{\applyoutput} expression is the most flexible way to +\header { + 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 'molecule-callback 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