--- /dev/null
+\version "2.13.10"
+\header {
+ texidoc =
+
+ " Hara-kiri staves are suppressed if they are empty. This
+example really contains three drum staves, but as it progresses, empty ones
+are removed: this example has three staves, but some of them
+disappear: note how the 2nd line only has the bar number 2. (That the
+bar number is printed might be considered a bug, however, the scenario
+of all staves disappearing does not happen in practice.)
+
+Any staff brackets and braces are removed, both in the single staff
+and no staff case.
+"
+
+}
+
+\layout {
+ ragged-right = ##t
+ \context {
+ \RemoveEmptyDrumStaffContext
+ }
+}
+
+\transpose c c''
+\context StaffGroup <<
+ \new DrumStaff
+ \drummode {
+ sn4 sn sn sn \break
+ s1 \break
+ sn4 sn sn sn \break
+ sn sn sn sn
+ }
+ \new DrumStaff
+ \drummode {
+ hh4 hh hh hh
+ s1
+ s1
+ s1
+ }
+ \new DrumStaff
+ \drummode {
+ bd4 bd bd bd
+ s1
+ bd4 bd bd bd
+ s1
+ }
+>>
+\version "2.13.10"
+
\header {
- texidoc = "Staves with percent repeats are not killed."
+ texidoc = "Staves, RhythmicStaves, TabStaves and DrumStaves
+ with percent repeats are not suppressed."
}
-\version "2.12.0"
-
<<
- \new Staff { c''1 c'' \break c'' c'' }
- \new Staff \repeat percent 4 { c'1 }
+ \new Staff { c''1 c'' \break c'' c'' }
+ \new Staff \repeat percent 4 { c'1 }
+ \new TabStaff \repeat percent 4 { c1 }
+ \new DrumStaff \drummode { \repeat percent 4 { hh1 } }
+ \new RhythmicStaff \repeat percent 4 { c'1 }
>>
\layout {
- \context {
- \RemoveEmptyStaffContext
- }
-}
+ \context { \RemoveEmptyStaffContext }
+ \context { \RemoveEmptyRhythmicStaffContext }
+ \context { \RemoveEmptyDrumStaffContext }
+ \context { \RemoveEmptyTabStaffContext }
+ }
+
--- /dev/null
+\version "2.13.10"
+\header {
+ texidoc =
+
+ " Hara-kiri staves are suppressed if they are empty. This
+example really contains three rhythmic staves, but as it progresses, empty ones
+are removed: this example has three staves, but some of them
+disappear: note how the 2nd line only has the bar number 2. (That the
+bar number is printed might be considered a bug, however, the scenario
+of all staves disappearing does not happen in practice.)
+
+Any staff brackets and braces are removed, both in the single staff
+and no staff case.
+"
+
+}
+
+\layout {
+ ragged-right= ##t
+ \context {
+ \RemoveEmptyRhythmicStaffContext
+ }
+}
+
+\context StaffGroup <<
+ \new RhythmicStaff {
+ c4 c c c \break
+ s1 \break
+ c4 c c c \break
+ c c c c
+ }
+ \new RhythmicStaff {
+ c4 c c c
+ s1
+ s1
+ s1
+ }
+ \new RhythmicStaff {
+ c4 c c c
+ s1
+ c4 c c c
+ s1
+ }
+>>
--- /dev/null
+\version "2.13.10"
+
+\header {
+ texidoc =
+
+ " Hara-kiri staves are suppressed if they are empty. This
+example really contains three tab staves, but as it progresses, empty ones
+are removed: this example has three staves, but some of them
+disappear: note how the 2nd line only has the bar number 2. (That the
+bar number is printed might be considered a bug, however, the scenario
+of all staves disappearing does not happen in practice.)
+
+Any staff brackets and braces are removed, both in the single staff
+and no staff case."
+
+}
+
+\layout {
+ ragged-right= ##t
+ \context {
+ \RemoveEmptyTabStaffContext
+ }
+}
+
+
+\context PianoStaff <<
+ \new TabStaff {
+ c4 c c c \break
+ s1 \break
+ c4 c c c \break
+ c c c c
+ }
+ \new TabStaff {
+ d4 d d d
+ s1
+ s1
+ s1
+ }
+ \new TabStaff {
+ e4 e e e
+ s1
+ e4 e e e
+ s1
+ }
+>>
+
+
+
%%%% You should have received a copy of the GNU General Public License
%%%% along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-\version "2.12.0"
+\version "2.13.10"
\context {
\name "Global"
}
-RemoveEmptyStaffContext= \context {
+RemoveEmptyStaffContext = \context {
\Staff
\remove "Axis_group_engraver"
\consists "Hara_kiri_engraver"
printKeyCancellation = ##f
}
+RemoveEmptyDrumStaffContext = \context {
+ \DrumStaff
+ \remove "Axis_group_engraver"
+ \override VerticalAxisGroup #'remove-empty = ##t
+ \consists "Hara_kiri_engraver"
+}
-RemoveEmptyRhythmicStaffContext= \context {
+RemoveEmptyRhythmicStaffContext = \context {
\RhythmicStaff
\remove "Axis_group_engraver"
\override VerticalAxisGroup #'remove-empty = ##t
\consists "Hara_kiri_engraver"
}
+
+RemoveEmptyTabStaffContext = \context {
+ \TabStaff
+ \remove "Axis_group_engraver"
+ \override VerticalAxisGroup #'remove-empty = ##t
+ \consists "Hara_kiri_engraver"
+}
+