Originally created by: *anonymous
Originally created by: gpermus@gmail.com
Originally owned by: joenee...@gmail.com
When typesetting an orchestral score with Piano or Harp parts, and using
RemoveEmptyStaffContext, the PianoStaff can sometimes be reduced to one
single staff (for instance when only one hand is playing).
This doesn't seem to be the right engraving rule in orchestral scores,
where both staves are usually preserved wherever there's enough space
on the page.
Here's Kieren suggestion to deal with this issue:
---------- Forwarded message ----------
From: Kieren MacMillan <kieren_macmillan@sympatico.ca>
Date: 26 août 2007 17:47
IMO, this should be a setting similar to connectArpeggios -- say,
keepAliveTogether -- where the default is ##t, but it can be set to
##f as desired. I suppose this could also be extended (as an
interface) to ChoirStaff, StaffGroup, etc., for ultimate flexibility.
----------------------------------------------------
In the following example, the piano staves should only be hidden in
the third system.
%%%%
one = {
\repeat unfold 4 { a4 b c' d'} \break
\repeat unfold 4 { a4 b c' d'} \break
\repeat unfold 4 { a4 b c' d'} \break
a1
}
two = { \clef bass
\repeat unfold 4 { a4 b c' d'} \break
\repeat unfold 4 { a4 b c' d'} \break
[r1]*4 \break
a1
}
three = { \clef bass
\repeat unfold 4 { a4 b c' d'} \break
[r1]*4 \break
[r1]*4 \break
a1
}
\score {<<
\context Staff = one \one
\new PianoStaff <<
\context Staff = two \two
\context Staff = three \three >>
>>
\layout {
\context { \RemoveEmptyStaffContext }
}
}
%%%%
Originally posted by: joenee...@gmail.com
How would you know which staves to keep alive together? What would be the expected
behaviour of
\new GrandStaff
<<
\new Staff \with { keepAliveTogether = ##t }
\new Staff \with { keepAliveTogether = ##f }
\new PianoStaff
<<
\new Staff \with { keepAliveTogether = ##t }
\new Staff \with { keepAliveTogether = ##f }
>>
>>
Originally posted by: lemzw...@googlemail.com
What about disallowing nesting? Or make the highest-level keepAliveTogether flag
succeed.
Originally posted by: v.villenave
I have posted a (hackish) workaround here:
http://lists.gnu.org/archive/html/lilypond-devel/2009-09/msg00005.html
Hopefully someone will come up with something better :-)
Summary: Enhancement: RemoveEmptyStaffContext shouldn't reduce PianoStaff to one staff
Originally posted by: v.villenave
According to Graham, it should only take an experienced dev. a few hours to address this issue. I'm not sure a €50 bounty could help here, but let's give it a try anyway...
Jan, Neil, anyone? 50 bucks waiting for you here :-)
Labels: Bounty
Owner: ---
Originally posted by: joenee...@gmail.com
The patch linked below adds this functionality with a context property. You have to name the staves that you want to keep alive together, so there is no ambiguity coming from nesting. In Kieren's original example, you would need to add
\with { keepAliveWith = #'("three")) }
to staff two and
\with { keepAliveWith = #'("two")) }
to staff three.
http://codereview.appspot.com/1871047
Originally posted by: joenee...@gmail.com
(No comment was entered for this change.)
Owner: joeneeman
Status: Started
Originally posted by: dak@gnu.org
I think that the default for a PianoStaff as opposed to a normal StaffGroup should be to
a) keep its systems alive together
b) keep its systems spaced together
While the "alive together" property arguably should be solved by letting RemoveEmptyStaffContext only work on top level Staffs/StaffGroups in the context having the respective engraver, making a spacing group would solve the problem of organ score spacing within an orchestral score, something currently done with more manual effort in the snippets.
Perhaps we need two different engravers? One that determines an empty staff/staffgroup, and one that actually removes subordinate empty staff/group contexts if all of them have declared emptiness, passing emptiness upwards?
The keepalivewith property appears like a kludge that should, if at all, be maintained automatically.
Originally posted by: n.putt...@gmail.com
I'm afraid I agree with David here, even though the patch looks pretty good.
This behaviour should be the default for a PianoStaff, so either a \consist-ed engraver or property set in the PianoStaff context would be preferable.
David, I'm pretty sure we already have support for spacing within a grouping context via StaffGrouper: it's used in PianoStaff (via the addition of Vertical_align_engraver and setting topLevelAlignment = ##f).
Originally posted by: tdanielsmusic
My preference (of Neil's suggestions) is for the action to be based on a property of the staff grouping, set by default for PianoStaff. It would then be available dynamically for use in ChoirStaff and other groupings as required.
Originally posted by: joenee...@gmail.com
Dynamic is hard, for the same reason that you can't \override VerticalAxisGroup in the middle of a piece: the engraver only creates one VerticalAxisGroup for the whole piece. But here's a patch that does the engraver version:
http://codereview.appspot.com/1888042
Originally posted by: n.putt...@gmail.com
(No comment was entered for this change.)
Labels: Patch
Originally posted by: v.villenave
Wow, pretty impressive. Great work Joe; you have no idea how badly this feature was needed out there :)
Should we mark this as fixed_2_13_30? The Bug Squad will officially "Verify" it with the next GUB release.
Originally posted by: percival.music.ca@gmail.com
If the patch was pushed, then of course the status should be "fixed" and tagged with "fixed_2_13_30". Don't forget to send your bounty to the relevant person.
Originally posted by: n.putt...@gmail.com
(No comment was entered for this change.)
Labels: fixed_2_13_30
Status: Fixed
Originally posted by: jameseli...@googlemail.com
I agree. Awesome.
Originally posted by: PhilEHol...@googlemail.com
Verified, using the example initially quoted, that an empty stave that is part of a piano staff group, and is accompanied by a stave which is not empty, continues to be displayed as a line of rests. Where both staves are empty, they disappear as planned. (Note - the regtest documentation is now in error - I'll raise an issue report.)
Status: Verified
Originally posted by: arnonoki...@googlemail.com
But how do i switch back if i need the old behaviour?
Originally posted by: k-ohara5...@oco.net
> if i need the old behaviour?
Use GrandStaff instead of PianoStaff for cases when you want LilyPond to reduce the number of staves in the GrandStaff if just some of them are empty.
Originally posted by: joenee...@gmail.com
Or remove the Keep_alive_together engraver from PianoStaff.