]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/center-text-below-hairpin-dynamics.ly
Docs: run convert-ly for 2.14.0.
[lilypond.git] / Documentation / snippets / center-text-below-hairpin-dynamics.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.0"
8
9 \header {
10   lsrtags = "expressive-marks, text"
11
12 %% Translation of GIT committish: 59caa3adce63114ca7972d18f95d4aadc528ec3d
13   texidoces = "
14 Este ejemplo proporciona una función para tipografiar un regulador con
15 texto por debajo, como @qq{molto} o @qq{poco}. El ejemplo ilustra
16 también cómo modificar la manera en que se imprime normalmente un
17 objeto, utilizando código de Scheme.
18
19 "
20   doctitlees = "Centrar texto debajo de un regulador"
21
22   texidoc = "
23 This example provides a function to typeset a hairpin (de)crescendo
24 with some additional text below it, such as @qq{molto} or @qq{poco}.
25 The example also illustrates how to modify the way an object is
26 normally printed, using some Scheme code.
27
28 "
29   doctitle = "Center text below hairpin dynamics"
30 } % begin verbatim
31
32 hairpinWithCenteredText =
33 #(define-music-function (parser location text) (markup?)
34 #{
35   \override Voice.Hairpin #'stencil = #(lambda (grob)
36     (ly:stencil-aligned-to
37      (ly:stencil-combine-at-edge
38       (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
39       Y DOWN
40       (ly:stencil-aligned-to (grob-interpret-markup grob $text) X CENTER))
41      X LEFT))
42 #})
43
44 hairpinMolto = \hairpinWithCenteredText \markup { \italic molto }
45 hairpinMore = \hairpinWithCenteredText \markup { \larger moltissimo }
46
47 \layout { ragged-right = ##f }
48
49 \relative c' {
50   \hairpinMolto
51   c2\< c\f
52   \hairpinMore
53   c2\< c\f
54 }