1 %% Do not edit this file; it is auto-generated from LSR!
2 %% Tags: expressive-marks, text
6 This example provides a function to typeset hairpin (de)crescendo with
7 some additional text below it, such as \"molto\" or \"poco\".
9 The example also illustrates how to use modify the way an object
10 normally is printed, using some Scheme code.
13 hairpinWithCenteredText = #(define-music-function
14 (parser location text) (markup?)
16 \override Voice.Hairpin #'stencil = #(lambda (grob)
17 (ly:stencil-aligned-to
18 (ly:stencil-combine-at-edge
19 (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
22 (ly:stencil-aligned-to (ly:text-interface::print grob) X CENTER))
24 \override Voice.Hairpin #'text = $text
28 hairpinMolto = \hairpinWithCenteredText \markup {\italic "molto"}
29 hairpinMore = \hairpinWithCenteredText \markup {\bigger "moltissimo"}
32 \hairpinMolto c'2\< c'2\f
33 \hairpinMore c'2\< c'2\f