]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/apply-output.ly
cleanup. Separate into internal
[lilypond.git] / input / regression / apply-output.ly
1
2 \version "2.1.21" 
3 \header {
4
5 texidoc = "The @code{\applyoutput} expression is the most flexible way to
6 tune properties for individual grobs.
7
8 Here, the layout of a note head is changed depending on its vertical
9 position.
10 "
11
12 }
13
14 #(define  (mc-squared gr org cur)
15   (let*
16       (
17        (ifs (ly:get-grob-property gr 'interfaces))
18        (sp (ly:get-grob-property gr 'staff-position))
19        )
20   (if (and (memq 'note-head-interface ifs)
21            (memq sp '(-2 -3 -5)))
22       (begin
23         (ly:set-grob-property! gr 'print-function brew-new-markup-molecule)
24         (ly:set-grob-property! gr 'font-family 'roman)
25         (ly:set-grob-property!
26          gr 'text
27          (make-raise-markup -0.5
28                             (case sp
29                               ((-5) (make-simple-markup "m"))
30                               ((-3) (make-simple-markup "c "))
31                               ((-2) (make-smaller-markup (make-bold-markup "2")))
32                               (else (make-simple-markup "bla"))
33                               ))))
34       )))
35
36 \score {
37
38 \notes \context Voice \relative  c' {
39                                       \stemUp
40                                       \property Voice.autoBeaming = ##f
41    { <d f g b>8
42      \context Voice \applyoutput #mc-squared
43
44          <d f g b>
45    }
46               
47    }
48 \paper { raggedright = ##t
49 %                    outputscale = 5
50                      } 
51 }