]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/changing-properties-for-individual-grobs.ly
Fix makelsr.py and update LSR
[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 %% Tags: tweaks-and-overrides
4 \version "2.11.35"
5
6 \header { texidoc = "
7 The @code{\\applyOutput} command gives you the ability to tune any
8 layout object, in any context. It requires a Scheme function with three
9 arguments; advanced users can write it quite easily, whereas new users
10 may want to use pre-defined functions such as this snippet, or the
11 example in the manual.
12 " }
13 % begin verbatim
14 % ****************************************************************
15 % ly snippet:
16 % ****************************************************************
17
18 \layout {
19   ragged-right = ##t
20 }
21
22 #(define (mc-squared gr org cur)
23   (let*
24    (
25      (ifs (ly:grob-interfaces gr))
26      (sp (ly:grob-property gr 'staff-position))
27    )
28    (if (memq 'note-head-interface ifs)
29     (begin
30      (ly:grob-set-property! gr 'stencil ly:text-interface::print)
31      (ly:grob-set-property! gr 'font-family 'roman)
32      (ly:grob-set-property! gr 'text
33       (make-raise-markup -0.5
34        (case sp
35         ((-5) (make-simple-markup "m"))
36         ((-3) (make-simple-markup "c "))
37         ((-2) (make-smaller-markup (make-bold-markup "2")))
38         (else (make-simple-markup "bla"))
39       ))))
40   )))
41
42 \context Voice \relative c' {
43   \stemUp
44   \set autoBeaming = ##f
45
46   { <d f g b>8
47
48     \applyOutput #'Voice #mc-squared
49     <d f g b>
50   }
51 }
52
53 % ****************************************************************
54 % end ly snippet
55 % ****************************************************************