]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/regression/dynamics-custom-text-spanner-postfix.ly
resolve merge
[lilypond.git] / input / regression / dynamics-custom-text-spanner-postfix.ly
diff --git a/input/regression/dynamics-custom-text-spanner-postfix.ly b/input/regression/dynamics-custom-text-spanner-postfix.ly
new file mode 100644 (file)
index 0000000..cb2a63e
--- /dev/null
@@ -0,0 +1,26 @@
+\version "2.14.0"
+
+\header {
+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."
+}
+
+% Two functions for (de)crescendo spanners where you can explicitly give the
+% spanner text.
+mycresc = #(define-music-function (parser location mymarkup) (string?)
+  (make-music 'CrescendoEvent 'span-direction START
+              'span-type 'text 'span-text mymarkup))
+mydecresc = #(define-music-function (parser location mymarkup) (string?)
+  (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
+}
+
+
+