Hi, issue 4625 in the tracker <URL:https://sourceforge.net/p/testlilyissues/issues/4625/> is the final straw to provide an actual input syntax for setting the spanner-id property introduced before version 2.16. I think currently only slurs and phrasing slurs heed them. While the principal property is a string, I think it makes sense to also allow numbers.
How do people feel about choosing one of the following variations of \- and \= (code compiles and does the expected thing even in 2.18):
\version "2.18.0" "\\=" = #(define-event-function (parser location id ev) (number-or-string? ly:event?) (set! (ly:music-property ev 'spanner-id) (if (number? id) (number->string id) id)) ev) "\\-" = #(define-event-function (parser location id ev) (number-or-string? ly:event?) (set! (ly:music-property ev 'spanner-id) (if (number? id) (number->string id) id)) ev) \relative { c'\=1( d\=2( e\=1) f\=2) } \relative { c'\-1( d\-2( e\-1) f\-2) } % should we prefer this variant in the docs? \relative { c'\-1-( d\-2-( e\-1-) f\-2-) } % if so, how to write slur directions? \relative { c'\-1^( d\-2_( e\-1-) f\-2-) } \relative { c'^\-1-( d_\-2-( e\-1-) f\-2-) } % using simple strings \relative { c'\=x( d\=y( e\=x) f\=y) } \relative { c'\-x( d\-y( e\-x) f\-y) } \relative { c'\-x-( d\-y-( e\-x-) f\-y-) }
Other options I have thought about would be \# but it turns out that looks really clunky and works worse logically with strings than with numbers. Also it might be more trouble with syntax highlighting because of already existing meanings of # . -- David Kastrup
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user