]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/dynamics-custom-text-spanner-postfix.ly
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / snippets / new / dynamics-custom-text-spanner-postfix.ly
1 \version "2.13.4"
2
3 \header {
4   lsrtags = "expressive-marks, tweaks-and-overrides"
5   texidoc = "Postfix functions for custom crescendo text spanners.  The spanners
6 should start on the first note of the measure.  One has to use -\mycresc,
7 otherwise the spanner start will rather be assigned to the next note.
8 "
9   doctitle = "Dynamics custom text spanner postfix"
10 }
11
12 % Two functions for (de)crescendo spanners where you can explicitly give the
13 % spanner text.
14 mycresc = #(define-music-function (parser location mymarkup) (string?)
15   (make-music 'CrescendoEvent 'span-direction START
16               'span-type 'text 'span-text mymarkup))
17 mydecresc = #(define-music-function (parser location mymarkup) (string?)
18   (make-music 'DecrescendoEvent 'span-direction START
19               'span-type 'text 'span-text mymarkup))
20
21 \relative c' {
22   c4-\mycresc "custom cresc" c4 c4 c4 |
23   c4 c4 c4 c4 |
24   c4-\mydecresc "custom decresc" c4 c4 c4 |
25   c4 c4\! c4 c4
26 }
27
28
29