]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/dynamics-text-spanner-postfix.ly
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / snippets / new / dynamics-text-spanner-postfix.ly
1 \version "2.13.4"
2
3 \header {
4   lsrtags = "expressive-marks, tweaks-and-overrides"
5   texidoc = "The \cresc, \dim and \decresc spanners can now be redefined as
6 postfix operators and produce one text spanner.  Defining custom spanners is
7 also easy.  Hairpin and text crescendi can be easily mixed. \< and \> produce
8 hairpins by default, \cresc etc. produce text spanners by default.
9 "
10   doctitle = "Dynamics text spanner postfix"
11 }
12
13 % Some sample text dynamic spanners, to be used as postfix operators
14 crpoco = #(make-music 'CrescendoEvent 'span-direction START
15                       'span-type 'text 'span-text "cresc. poco a poco")
16 % Redefine the existing \cresc, \dim and \decresc commands to use postfix syntax
17 cresc = #(make-music 'CrescendoEvent 'span-direction START
18                      'span-type 'text 'span-text "cresc.")
19 dim = #(make-music 'DecrescendoEvent 'span-direction START
20                    'span-type 'text 'span-text "dim.")
21 decresc = #(make-music 'DecrescendoEvent 'span-direction START
22                        'span-type 'text 'span-text "decresc.")
23
24 \relative c' {
25   c4\cresc d4 e4 f4 |
26   g4 a4\! b4\crpoco c4 |
27   c4 d4 e4 f4 |
28   g4 a4\! b4\< c4 |
29   g4\dim a4 b4\decresc c4\!
30 }