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. 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 _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user