]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/changing-properties-for-individual-grobs.ly
Merge master into nested-bookparts
[lilypond.git] / input / lsr / changing-properties-for-individual-grobs.ly
1 %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
3 \version "2.11.62"
4
5 \header {
6   lsrtags = "tweaks-and-overrides"
7
8   texidoc = "
9 The @code{\\applyOutput} command allows the tuning of any layout
10 object, in any context. It requires a Scheme function with three
11 arguments.
12
13 "
14   doctitle = "Changing properties for individual grobs"
15 } % begin verbatim
16 \layout {
17   ragged-right = ##t
18 }
19
20 #(define (mc-squared grob grob-origin context)
21   (let*
22    (
23      (ifs (ly:grob-interfaces grob))
24      (sp (ly:grob-property grob 'staff-position))
25    )
26    (if (memq 'note-head-interface ifs)
27     (begin
28      (ly:grob-set-property! grob 'stencil ly:text-interface::print)
29      (ly:grob-set-property! grob 'font-family 'roman)
30      (ly:grob-set-property! grob 'text
31       (make-raise-markup -0.5
32        (case sp
33         ((-5) (make-simple-markup "m"))
34         ((-3) (make-simple-markup "c "))
35         ((-2) (make-smaller-markup (make-bold-markup "2")))
36         (else (make-simple-markup "bla"))
37       ))))
38   )))
39
40 \relative c' {
41   <d f g b>2
42   \applyOutput #'Voice #mc-squared
43   <d f g b>
44 }