lilypond-devel
[Top][All Lists]
Advanced

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

engraver to change staff name based on visibility of related staff?


From: Shevek
Subject: engraver to change staff name based on visibility of related staff?
Date: Fri, 16 Jun 2017 14:47:26 -0700 (MST)

Following up on an aspect of the discussion on parts sharing a staff
(http://lilypond.1069038.n5.nabble.com/parts-sharing-a-staff-tt203873.html).

I've spent quite a few hours over the last day trying to figure out how
engravers work and how I might take a crack at writing something to
automatically handle changing Staff names for divisi staves. I feel like
I've understood most of what I've read, but I'm still totally befuddled.
This seems like a difficult problem because:

1) It's completely opaque to me how one would check if a Staff is visible or
not on a given system. The hara-kiri-group-spanner, as far as I can tell,
does its work without telling anybody about it. There's not like a boolean
function you can call to find out if a context will be visible.

2) One needs to do something in one context depending on what happens in a
different context. Most of the example engravers just do something in one
context. Keep_alive_together_engraver collects grobs from different contexts
and tells them about each other, but then relies on on them to figure out
what to do with that information. That doesn't seem adequate here.

3) Such an engraver would need to step through the score by system, after
breaking, rather than event by event, and it might need to be able to
backtrack to insert an event to change the instrument name prior to the most
recent system break. The code and documentation I've read has not given me
any insight into how one might do such a thing.

I'd love some feedback and guidance.



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/engraver-to-change-staff-name-based-on-visibility-of-related-staff-tp203905.html
Sent from the Dev mailing list archive at Nabble.com.



reply via email to

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