]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4626/1: Create \= command for setting spanner-id
authorDavid Kastrup <dak@gnu.org>
Sat, 3 Oct 2015 05:58:57 +0000 (07:58 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 11 Oct 2015 08:36:49 +0000 (10:36 +0200)
ly/spanners-init.ly

index 50cf12dbb2d188db45321083b1fd40bd21f0d418..756a55579e377935ab3b7242db358a54eb499576 100644 (file)
@@ -1,4 +1,19 @@
-\version "2.16.0"
+\version "2.19.29"
+
+"\\=" =
+#(define-event-function (id event) (number-or-string? ly:event?)
+  (_i "This sets the @code{spanner-id} property of the following
+@var{event} to the given @var{id} (numbers will be converted to a
+string).  This can be used to tell LilyPond how to connect overlapping
+or parallel slurs or phrasing slurs within a single @code{Voice}.
+@lilypond[quote,verbatim]
+\\fixed c' { c\\=1( d\\=2( e\\=1) f\\=2) }
+@end lilypond\n")
+  (set! (ly:music-property event 'spanner-id)
+       (if (number? id)
+           (number->string id)
+           id))
+  event)
 
 startGroup = #(make-span-event 'NoteGroupingEvent START)
 stopGroup = #(make-span-event 'NoteGroupingEvent STOP)