vertical extents to deal with Hara kiri correctly.
* input/regression/hara-kiri-short.ly: remove
* input/regression/hara-kiri-pianostaff.ly: update test.
2003-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * lily/system-start-delimiter.cc (after_line_breaking): retrieve
+ vertical extents to deal with Hara kiri correctly.
+
+ * input/regression/hara-kiri-short.ly: remove
+
+ * input/regression/hara-kiri-pianostaff.ly: update test.
+
* Documentation/user/*.tely: remove WEBTITLE
* scm/output-tex.scm (comment): idem.
are called @internalsref{BarLine}, the bar lines that span staffs are
@internalsref{SpanBar}s.
+The barlines at the start of each system are
+@internalsref{SystemStartDelimiter}s, which are spanner objects and
+typically must be tuned from a @code{\translator} block.
+
@node Polyphony
@section Polyphony
T delta () const;
void set_empty () ;
void set_full ();
+
+ /*
+ TODO: strip hungarian suffix.
+ */
bool empty_b () const { return elem (LEFT) > elem (RIGHT); }
bool contains_b (Interval_t<T> const&) const;
Interval_t () {
\version "1.7.19"
-\header {
-texidoc = "Hara kiri should not upset fixed distance alignment like in pianostaff. In this example the middle of 3 staves is harakiried."
+
+\header { texidoc =
+
+ " Hara kiri staves kill themselves if they are empty. This
+example really contains three staves, but as they progress, 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 doesn't happen in practice.)
+
+Any staff brackets and braces are removed, both in the single staff
+and no staff case.
+
+This example was done with a pianostaff, which has fixed distance
+alignment; this should not confuse the mechanism.
+"
+
}
- \paper { raggedright= ##t }
+
+\paper { raggedright= ##t }
\score { \notes \transpose c c''
\context PianoStaff <
- \context Staff = up { c c c c \break }
- \context Staff = mid { s1 \break }
- \context Staff = down { c4 c c c \break }
+ \context Staff = up { c4 c c c \break s1 \break c4 c c c \break c c c c}
+ \context Staff = mid { d4 d d d s1 s1 s1 s1 }
+ \context Staff = down { e4 e e e s1 e4 e e e s1 }
>
\paper {
\translator {
+++ /dev/null
-\version "1.7.19"
-\header{
-texidoc="
-Hara kiri staves kill themselves if they are empty. This example really
-contains two staves, but the second contains only spaces, and is
-therefore removed. Also, any staff brackets and braces are removed.
-"
-}
-
-
-
-
-
-zager = \context Staff = zager \notes \relative c'' {
- \clef treble
- c1 c1
-}
-
-zeuger = \context Staff = zeuger \notes \relative c'' {
- \clef treble
- c1 c1
-}
-
-zoger = \context Staff = zoger \notes \relative c'' {
- \clef treble
- \skip 2* 1
-}
-
-zagers = \context StaffGroup <
- \zager
- \zoger
- \zeuger
->
-
-\score{
- < \context StaffGroup = zagers <
- \zagers
- > >
- \paper{
- linewidth = 80.0\mm
-
- \translator { \RemoveEmptyStaffContext }
-%uh?
-
- }
-}
-
-
-
}
+%{
+
+TODO: what does this test? The contexts are tweaked too much.
+
+%}
+
#(ly:set-point-and-click 'line-column)
one = \notes\relative c'' {
Demonstration of how to set up an orchestral score (Beethoven's Coriolan overture).
" }
+\include "paper16.ly"
+
raisedFlat = \markup { \raise #0.4 \smaller \smaller \musicglyph #"accidentals--1" }
+
+
flauti = \notes \relative c' {
\property Staff.instrument = #"2 Flauti"
\property Staff.instr = #"Fl."
{
Grob * me = unsmob_grob (smob);
SCM gl = me->get_grob_property ("glyph");
-
- if (scm_ilength (me->get_grob_property ("elements")) <= 1
- && gh_equal_p (gl,scm_makfrom0str ("bar-line")))
+ if (gh_equal_p (gl,scm_makfrom0str ("bar-line")))
{
- me->suicide ();
+ int count = 0;
+
+ /*
+ Get all coordinates, to trigger Hara kiri.
+ */
+ SCM elts = me->get_grob_property ("elements");
+ Grob *common = common_refpoint_of_list (elts, me, Y_AXIS);
+ for (SCM s = elts; gh_pair_p (s); s = gh_cdr (s))
+ {
+ Interval v = unsmob_grob (gh_car (s))->extent (common, Y_AXIS);
+
+ if (!v.empty_b ())
+ count ++;
+ }
+
+
+ if (count <= 1)
+ {
+ me->suicide ();
+ }
}
-
return SCM_UNSPECIFIED;
}