lilypond-devel
[Top][All Lists]
Advanced

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

Re: Reasons for cross-voice limitations?


From: Urs Liska
Subject: Re: Reasons for cross-voice limitations?
Date: Mon, 30 Mar 2015 09:56:29 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.5.0



Am 30.03.2015 um 09:47 schrieb Urs Liska:


Am 30.03.2015 um 09:31 schrieb Werner LEMBERG:
This would warrant a better mechanism to transplant spanners to a
different context: basically one would want a mechanism to listen
to slur endings in a different context than to slur starts.
Possibly optionally with a \once qualification.
I think the idea of an analogy to \change Staff would be a good
start.  Tell a slur that it is going to end in another voice,
probably immediately before it is started.  Maybe something like

   \once \override Slur.target = "another-voice-name"

or

   \once \override Slur.id = "my-changed-slur"
   \once \override Slur.change-voice = ##t.

The first one would require the target to be a named voice, the
second would require all context to listen for that slur.

(of course slurs and co. are only one part of the issue, dynamics
and text spanners share the problem).
What about defining anchors?  Having a slur ending in a different
voice makes the `(' ... `)' notation extremely hard to read (if it
works at all).  Instead, I can imagine something like the following to
get a slur between voiceA and voiceB, starting on the second and
ending on the fourth quarter beat.

   in voiceA:  c4
               \connect #'Slur #'voiceB #'myanchor
               d e f

   in voiceB:  e4 f g
               \anchor #'myanchor
               a

The suggested `\connect' command would be generic enough to cover
(almost?) all spanner grobs; an optional fourth argument could hold
the necessary overrides.

You mean instead of writing "(", or "\<" or "\startTrillSpan" one would write "\connect" and that would instantiate the grob denoted by the first argument? I think that sounds good. But the second argument could be omitted as the anchor itself is unique and would know itself where it is. And I don't know if an additional argument for overrides would be necessary: This could be handled as usual, e.g.

\shape #'(...) Slur c4 \connect Slur myanchor

(IISC both "Slur" and "myanchor" could be entered like this, as simple symbols)

Urs

Thinking a little more about this: Wouldn't it even be possible to implement this as a pair of comparably simple Scheme functions? They would instantiate a hidden temporary Voice (of course using \omit not \hide) and add the respective spanner to that?

Urs



reply via email to

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