Urs Liska <[email protected]> writes: > Hi all, > > one more question about processing output: > > I would like to test each note and rest for the Voice number it has.
It hasn't. > Then I would like to set the color of this note/rest and corresponding > grobs (Stem/Flag/Beam) to a color depending on the voice number. > > Unfortunately I'm stumbling quite hopelessly through the IR, thinking > I could get somewhere with ly:context-property but not knowing what > the property name of a voice number (or generally the properties of a > Voice context) could be or where I could look this up. You can use \applyContext to get a notice of the current context. But notes and rests are not inherently bound to a context. Usually the note-events and rest-events are iterated from inside a Voice context (and seen by engravers in all parent contexts). You could add an engraver of your own into individual Voice contexts that adds appropriate tweaks to the events in the listener stage. You could also add an engraver of your own into individual Voice contexts that acknowledges the respective grobs and adds color to them. But short of using your own engraver in particular contexts in order to see either the events or the grobs, neither of them are particularly tied into a single context. -- David Kastrup _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
