On Aug 10, Reinhold Kainhofer wrote: > Am Mittwoch, 10. August 2011, 17:11:44 schrieb Ricardo Wurmus: > > On Aug 10, Neil Puttock wrote: > > > BTW, if you're prepared to wrap the notes in a chord (so you have > > > access to 'articulations), you won't even need a scheme engraver (all > > > the processing can take place in the NoteHead's stencil callback). > > > > It should be a generic engraver, so I cannot assume that notes will > > always be wrapped in a chord. I'll play around with defining a function > > for process-acknowledged and see where it leads me. > > One detail that might be interesting for you is that you can define engraver- > wide variables by wrapping the whole engraver in a (let (..) ...) block. > See e.g. the scheme engraver instance regtest (input/regression/scheme- > engraver-instance.ly in the source code tree): > <snip> > > > In this example, instance-counter is a global variable, which is reused by > every voice, while instance-id and private-note-counter are variables that are > separate for each voice. In this example, instance-id stores the number of the > voice, while private-note-counter counts the number of notes in each voice > separately. > In particular, the engravers used in the first and in the second voice will > have different private-note-counter variables. > > You can use this to collect information from all encountered objects and thin > in 'process-acknowledged or 'stop-translation-timestep procell all of them at > once. For a list of all possible "functions" inside the engraver, see > input/regression/scheme-engraver.ly
Thanks, this helped me quite a bit. The engraver is already working basically. Will just have to clean up and add a few more features. > Cheers, > Reinhold Best, Rekado _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel