]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/broken-crescendo-hairpin.ly
Fix 2241: Proper copyright/header/tagline handling with multiple bookparts
[lilypond.git] / Documentation / snippets / broken-crescendo-hairpin.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.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.14.2"
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 To fine-tune the position and size of the markup, the number preceding
19 @code{setgray} in the postscript definition can be set to a value less
20 than one, making it grey.  The two numbers before @code{scale} in the
21 postscript code are responsible for the width and height of the
22 rectangle, the two numbers before @code{translate} change the x- and
23 y-origin of the rectangle.
24
25
26 Make sure to put the hairpin in a lower layer than the text markup to
27 draw the rectangle over the hairpin.
28
29 "
30   doctitle = "Broken Crescendo Hairpin"
31 } % begin verbatim
32
33
34 \relative c' {
35   <<
36     {
37       \dynamicUp
38       \override DynamicLineSpanner #'staff-padding = #4
39       r2 r16 c'8.\pp r4
40     }
41     \\
42     {
43       \override DynamicLineSpanner #'layer = #0
44       des,2\mf\< ~
45       \override TextScript #'layer = #2
46       des16_\markup {
47         \postscript #"
48           1.9 -8 translate
49           5 4 scale
50           1 setgray
51           0 0 moveto
52           0 1 lineto
53           1 1 lineto
54           1 0 lineto
55           0 0 lineto
56           fill"
57       }
58       r8. des4 ~ des16->\sff
59     }
60   >>
61 }