]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/broken-crescendo-hairpin.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / Documentation / snippets / broken-crescendo-hairpin.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.18.0"
8
9 \header {
10   lsrtags = "contemporary-notation, expressive-marks, symbols-and-glyphs"
11
12   texidoc = "
13 In order to make parts of a crescendo hairpin invisible, the following
14 method is used: A white rectangle is drawn on top of the respective
15 part of the crescendo hairpin, making it invisible.  The rectangle is
16 defined as postscript code within a text markup.
17
18 The markup command @code{with-dimensions} tells LilyPond to consider
19 only the bottom edge of the rectangle when spacing it against the
20 hairpin. The property @code{staff-padding} prevents the rectangle from
21 fitting between the hairpin and staff.
22
23 Make sure the hairpin is in a lower layer than the text markup to draw
24 the rectangle over the hairpin.
25
26 "
27   doctitle = "Broken Crescendo Hairpin"
28 } % begin verbatim
29
30 \relative c' {
31   <<
32     {
33       \dynamicUp
34       r2 r16 c'8.\pp r4
35     }
36     \\
37     {
38       \override DynamicLineSpanner.layer = #0
39       des,2\mf\< ~
40       \override TextScript.layer = #2
41       \once\override TextScript.staff-padding = #6
42       \once\override TextScript.vertical-skylines = #'()
43       des16_\markup \with-dimensions #'(2 . 7) #'(0 . 0)
44                     \with-color #white
45                     \filled-box #'(2 . 7) #'(0 . 2) #0
46       r8. des4 ~ des16->\sff r8.
47     }
48   >>
49 }