I've been tinkering with the auto-transpose engraver from OLL, trying to automatically print key signatures if the transposition has been changed. In the original code it looks like the plan was to have the engraver broadcast a KeyChangeEvent, but when I tried that it ended up in an infinite loop of KeyChangeEvents, since the same engraver was also listening for them.
Attached is my attempt, splitting into two engravers. What I can't figure out is why when my autoKeysigEngraver broadcasts a KeyChangeEvent, it gets picked up by the Key_engraver but not by the autoTransposeEngraver. I'd love some help understanding what's going on here. Apologies for the messy testing code. Thanks!
auto-transpose.ily
Description: Binary data