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