lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Between context communication


From: Kyle Baldwin
Subject: Between context communication
Date: Mon, 5 Sep 2022 12:48:52 -0700

Hello - 

I'm trying to write an engraver that works in this way. 

It listens for absolute-dynamic events and text script and hairpin/dynamic-text-spanner events with a custom event name (ExpressiveTextEvent) and do some formatting.  If the text is by itself, it's italicized and put below the staff. If there is a dynamic event, it creates a new stencil with dynamic + text. If both the absolute and spanner exist, put the text below the spanner. There is also an option on the Expressive text where it will force the text to go above the staff. (All inspired by Gould 495) 

Everything works great as long as I have everything on the same staff. However, I would like to keep my dynamics and my notes separate in a << \Staff \Dynamics>> setup.  In this way, I can put the engraver on the Score and everything works well. But I am unsure how to expand this to a score with multiple sets of << \Staff \Dynamics>>.  

Three quick questions which maybe make it seem like I've missed something rudimentary. 

Is there an easy way to access the child contexts of a context through scheme in order to record names and make pairs? 

Can I even access the source contexts in either of the listener or acknowledger sections of an engraver? 

Would it be easiest to just create a new context type that wraps the music + dynamics and just put the custom engraver on that? Any other ideas?  

Thank you so much! 

-Kyle

reply via email to

[Prev in Thread] Current Thread [Next in Thread]