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 %% Tags: expressive-marks, text
7 This example provides a function to typeset hairpin (de)crescendo with
8 some additional text below it, such as \"molto\" or \"poco\".
10 The example also illustrates how to use modify the way an object
11 normally is printed, using some Scheme code.
14 hairpinWithCenteredText = #(define-music-function
15 (parser location text) (markup?)
17 \override Voice.Hairpin #'stencil = #(lambda (grob)
18 (ly:stencil-aligned-to
19 (ly:stencil-combine-at-edge
20 (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
23 (ly:stencil-aligned-to (ly:text-interface::print grob) X CENTER))
25 \override Voice.Hairpin #'text = $text
29 hairpinMolto = \hairpinWithCenteredText \markup {\italic "molto"}
30 hairpinMore = \hairpinWithCenteredText \markup {\bigger "moltissimo"}
33 \hairpinMolto c'2\< c'2\f
34 \hairpinMore c'2\< c'2\f