lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Syntax for multiple slurs per Voice?


From: David Kastrup
Subject: Syntax for multiple slurs per Voice?
Date: Fri, 02 Oct 2015 13:13:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]