X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fnew%2Fdynamics-custom-text-spanner-postfix.ly;fp=Documentation%2Fsnippets%2Fnew%2Fdynamics-custom-text-spanner-postfix.ly;h=57f22712fbac4e440211ea0abf7b2fa32c84ac97;hb=941dff9d2a67080e0dd8474f1e70f0c72ace6424;hp=0000000000000000000000000000000000000000;hpb=5a22d6233a39d3164e1ca043244794c268be4ad0;p=lilypond.git diff --git a/Documentation/snippets/new/dynamics-custom-text-spanner-postfix.ly b/Documentation/snippets/new/dynamics-custom-text-spanner-postfix.ly new file mode 100644 index 0000000000..57f22712fb --- /dev/null +++ b/Documentation/snippets/new/dynamics-custom-text-spanner-postfix.ly @@ -0,0 +1,35 @@ +\version "2.14.0" + +\header { + lsrtags = "expressive-marks, tweaks-and-overrides" + texidoc = "Postfix functions for custom crescendo text spanners. The spanners +should start on the first note of the measure. One has to use -\mycresc, +otherwise the spanner start will rather be assigned to the next note. +" + doctitle = "Dynamics custom text spanner postfix" +} + +% Two functions for (de)crescendo spanners where you can explicitly give the +% spanner text. +mycresc = +#(define-music-function (parser location mymarkup) (markup?) + (make-music 'CrescendoEvent + 'span-direction START + 'span-type 'text + 'span-text mymarkup)) +mydecresc = +#(define-music-function (parser location mymarkup) (markup?) + (make-music 'DecrescendoEvent + 'span-direction START + 'span-type 'text + 'span-text mymarkup)) + +\relative c' { + c4-\mycresc "custom cresc" c4 c4 c4 | + c4 c4 c4 c4 | + c4-\mydecresc "custom decresc" c4 c4 c4 | + c4 c4\! c4 c4 +} + + +