]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/center-text-below-hairpin-dynamics.ly
Make relative-includes configurable with a -d option.
[lilypond.git] / input / lsr / center-text-below-hairpin-dynamics.ly
1 %% Do not edit this file; it is auto-generated from input/new
2 %% This file is in the public domain.
3 \version "2.11.64"
4
5 \header {
6   texidoces = "
7 Este ejemplo proporciona una función para tipografiar un regulador
8 con texto por debajo, como \"molto\" o \"poco\". El ejemplo
9 ilustra también cómo modificar la manera en que se imprime
10 normalmente un objeto, utilizando código de Scheme.
11
12 "
13   doctitlees = "Centrar texto debajo de un regulador"
14
15   lsrtags = "expressive-marks, text"
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   doctitle = "Center text below hairpin dynamics"
24 } % begin verbatim
25
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 {
45   \hairpinMolto c'2\< c'\f
46   \hairpinMore  c'2\< c'\f
47 }