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