]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/changing-properties-for-individual-grobs.ly
1a005c4f9c3e7e2001cdc5ff30aa505c79059ce1
[lilypond.git] / Documentation / snippets / changing-properties-for-individual-grobs.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.14.2"
8
9 \header {
10   lsrtags = "tweaks-and-overrides, scheme-language, really-cool"
11
12 %% Translation of GIT committish: 1cda7b7b8219cb97399b8e7b56c1115aaf82c002
13   texidocfr = "
14 La commande @code{\\applyOutput} permet de personnaliser n'importe quel
15 objet de rendu.  Elle requiert une fonction Scheme à trois arguments.
16
17 "
18   doctitlefr = "Modification des propriétés d'objets particuliers"
19
20   texidoc = "
21 The @code{\\applyOutput} command allows the tuning of any layout
22 object, in any context. It requires a Scheme function with three
23 arguments.
24
25 "
26   doctitle = "Changing properties for individual grobs"
27 } % begin verbatim
28
29
30 #(define (mc-squared grob grob-origin context)
31   (let ((sp (ly:grob-property grob 'staff-position)))
32     (if (grob::has-interface grob 'note-head-interface)
33       (begin
34         (ly:grob-set-property! grob 'stencil
35           (grob-interpret-markup grob
36             (make-lower-markup 0.5
37               (case sp
38                 ((-5) "m")
39                 ((-3) "c ")
40                 ((-2) (make-smaller-markup (make-bold-markup "2")))
41                 (else "bla")))))))))
42
43 \relative c' {
44   <d f g b>2
45   \applyOutput #'Voice #mc-squared
46   <d f g b>2
47 }