Am 28.03.2017 um 14:56 schrieb David Kastrup:
> Urs Liska <u...@openlilylib.org> writes:
>
>> Hi all,
>>
>> (how) is it possible to determine (from within a stencil override
>> callback) if at any given point there is more than one active voice?
>> I've asked a similar question before but probably from the wrong
>> perspective.
>>
>> I'm overriding a stencil have to make a decision depending on the
>> situation of being in a single voice or a << { } \\ { } >> polyphony
>> construct.
>>
>> Any pointers? I assume this has something to do with contexts but I'm
>> not really there yet.
> Bad idea.  At the time a stencil callback is being called, contexts are
> long gone.  

OK.

> What context information you want should be left in the
> grob.  You can still look at the 'direction of the event-cause of the
> grob and that's a reliable measure for figuring out explicit directions
> (like ^( or _) ) in the source.  

I'm trying to get http://lsr.di.unimi.it/LSR/Snippet?id=889 to work,
which I found after this suggestion.
This will *not* detect directions that stem from \voiceOne (or their
implicit friends through the \\ polyphony construct, isn't it?

> You may try looking at the
> grob-property-data of 'direction which will be a direction when there is
> a direction override in progress (pointing to a multi-voice situation)
> and usually some sort of callback for the decision-making when it isn't.
> Except that the callback might already have been called and replaced
> with a direction.  So it's a bit shaky.

Hm, I'll have to try figuring out what that means.
Can that discern between a manual (local) override or a polyphony
\voiceXXX assignment?

Another option that would help me if it were possible to override some
custom property whenever a polyphonc section starts or stops (but it has
to be the implicit \\ construct, as that is what comes in from a format
converter).

The thing is, I can always read the 'direction from ly:grob-property,
but that doesn't tell me anything about its cause.
The actual problem is: I want to overrule LilyPond's direction handling
and place ties always opposite of the stem direction - but only in
monophonic, i.e. \oneVoice situations. In polyphonic sections they have
to point "outside", just as usual.

Urs

-- 
u...@openlilylib.org
https://openlilylib.org
http://lilypondblog.org


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to