]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/dynamics-custom-text-spanner-postfix.ly
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / snippets / dynamics-custom-text-spanner-postfix.ly
1 % Do not edit this file; it is automatically
2 % generated from Documentation/snippets/new
3 % This file is in the public domain.
4 %% Note: this file works from version 2.13.8
5 \version "2.13.16"
6
7 \header {
8   lsrtags = "expressive-marks, tweaks-and-overrides"
9   texidoc = "Postfix functions for custom crescendo text spanners.  The spanners
10 should start on the first note of the measure.  One has to use -\mycresc,
11 otherwise the spanner start will rather be assigned to the next note.
12 "
13   doctitle = "Dynamics custom text spanner postfix"
14 } % begin verbatim
15
16
17 % Two functions for (de)crescendo spanners where you can explicitly give the
18 % spanner text.
19 mycresc =
20 #(define-music-function (parser location mymarkup) (markup?)
21    (make-music 'CrescendoEvent
22                'span-direction START
23                'span-type 'text
24                'span-text mymarkup))
25 mydecresc =
26 #(define-music-function (parser location mymarkup) (markup?)
27    (make-music 'DecrescendoEvent
28                'span-direction START
29                'span-type 'text
30                'span-text mymarkup))
31
32 \relative c' {
33   c4-\mycresc "custom cresc" c4 c4 c4 |
34   c4 c4 c4 c4 |
35   c4-\mydecresc "custom decresc" c4 c4 c4 |
36   c4 c4\! c4 c4
37 }
38
39
40