dtsmarin <dts_mari...@yahoo.com> writes:

> Hello,
>
> I don't know if this is entirely possible in the current state of Lilypond
> but I think it will be quite useful for a lot of people here.
>
> Let's say we have 6 Horns. In some cases we might need to alternate between
> 1, 2 or 3 staves 
> depending on the complexity of the music. This already makes the naming
> process (if we take into consideration all the different title combinations
> for all winds and brass etc.) tiring. Also fixing things later get messy if
> the names don't match with the content.
>
> It would be easier if a code monitored staff activity and chose the
> appropriate name:
> a) 1 stave = 1-6
> b) 2 staves = 1-3 / 4-6
> c) 3 staves = 1-2 / 3-4 / 5-6 etc.
>
> The same concept could be applied even with voices...
>
> This sounds really hard to achieve but will be really helpful with the
> orchestral scores.
>
>
> Even if this can't be done for any reason whatsoever, I would appreciate
> hearing your thoughts on this.

This is the standard use case for the remove-layer feature.  Basically
you always typeset all three variants, give case c) a remove-layer of 1
(highest priority), case b) one of 2, case c) of 3.  You put all these
versions into one containing StaffGroup (or ChoirStaff or whatever) and
consisting the Keep_alive_together_engraver and then clear
items-worth-living on the spacier variants whenever they are unnecessary
(so basically you need to mark the passages requiring 2/3 staves
manually with the respective overrides).

Take a look at input/regression/divisi-staves.ly for an example.

-- 
David Kastrup

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to