[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Detecting polyphony from stencil-override
From: |
David Kastrup |
Subject: |
Re: Detecting polyphony from stencil-override |
Date: |
Tue, 28 Mar 2017 14:56:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Urs Liska <address@hidden> 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. 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. 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.
--
David Kastrup