measure_length
* lily/spacing-engraver.cc (acknowledge_grob): ignore
multi-measure events for spacing computation.
* input/GNUmakefile (SUBDIRS): remove ascii-art
2004-02-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2004-02-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/spacing-spanner.cc: bound shortest_playing_len by
+ measure_length
+
+ * lily/spacing-engraver.cc (acknowledge_grob): ignore
+ multi-measure events for spacing computation.
+
* mf/feta-bolletjes.mf (overdone_heads): make note heads more
elliptical, to 1.49.
* mf/feta-bolletjes.mf (overdone_heads): make note heads more
elliptical, to 1.49.
--- /dev/null
+\header {
+
+ texidoc = "By setting texts starting with a mmrest we create
+an extra spacing column. This should not cause problems."
+ }
+\version "2.1.22"
+
+\score {
+ <<
+ \set Score.skipBars = ##t
+ \context Staff = flute \notes \new Voice {
+ << { R1*40 } { s1*0^"bla" }>>
+ }
+ >>
+ \paper {
+ raggedright = ##t
+ }
+ }
SCM smp = get_property ("measurePosition");
Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
SCM smp = get_property ("measurePosition");
Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
Pointer_group_interface::add_grob (spacing_, ly_symbol2scm ("wishes"), i.grob_);
}
Pointer_group_interface::add_grob (spacing_, ly_symbol2scm ("wishes"), i.grob_);
}
- if (i.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface")))
+ if (i.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))
+ || i.grob_->internal_has_interface (ly_symbol2scm ("multi-measure-event")))
(different time sigs) than others, and should be spaced differently.
*/
void
(different time sigs) than others, and should be spaced differently.
*/
void
-Spacing_spanner::do_measure (Rational shortest, Grob*me, Link_array<Grob> *cols)
+Spacing_spanner::do_measure (Rational global_shortest, Grob*me, Link_array<Grob> *cols)
{
Real headwid = robust_scm2double (me->get_grob_property ("spacing-increment"), 1);
{
Real headwid = robust_scm2double (me->get_grob_property ("spacing-increment"), 1);
if (!Paper_column::is_musical (l))
{
if (!Paper_column::is_musical (l))
{
- breakable_column_spacing (me, l, r, shortest);
+ breakable_column_spacing (me, l, r, global_shortest);
Item *rb = r->find_prebroken_piece (LEFT);
if (lb)
Item *rb = r->find_prebroken_piece (LEFT);
if (lb)
- breakable_column_spacing (me, lb,r, shortest);
+ breakable_column_spacing (me, lb,r, global_shortest);
- breakable_column_spacing (me, l, rb, shortest);
+ breakable_column_spacing (me, l, rb, global_shortest);
- breakable_column_spacing (me, lb, rb, shortest);
+ breakable_column_spacing (me, lb, rb, global_shortest);
- musical_column_spacing (me, lc, rc, headwid, shortest);
+ musical_column_spacing (me, lc, rc, headwid, global_shortest);
if (Item *rb = r->find_prebroken_piece (LEFT))
if (Item *rb = r->find_prebroken_piece (LEFT))
- musical_column_spacing (me, lc, rb, headwid, shortest);
+ musical_column_spacing (me, lc, rb, headwid, global_shortest);
spacing parameters INCR and SHORTEST.
*/
void
spacing parameters INCR and SHORTEST.
*/
void
-Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real increment, Rational shortest)
+Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real increment, Rational global_shortest)
{
bool expand_only = false;
{
bool expand_only = false;
- Real base_note_space = note_spacing (me, lc, rc, shortest, &expand_only);
+ Real base_note_space = note_spacing (me, lc, rc, global_shortest, &expand_only);
Real compound_note_space = 0.0;
Real compound_fixed_note_space = 0.0;
Real compound_note_space = 0.0;
Real compound_fixed_note_space = 0.0;
Moment rwhen = Paper_column::when_mom (rc);
Moment delta_t = rwhen - lwhen;
Moment rwhen = Paper_column::when_mom (rc);
Moment delta_t = rwhen - lwhen;
- if (!Paper_column::is_musical (rc ))
+ if (!Paper_column::is_musical (rc))
{
/*
when toying with mmrests, it is possible to have musical
column on the left and non-musical on the right, spanning
several measures.
{
/*
when toying with mmrests, it is possible to have musical
column on the left and non-musical on the right, spanning
several measures.
-
- In 2.0.1, this still fucks up in an interesting way:
-
-
-\score {
-{ \property Score.skipBars = ##t
- \context Staff = clarinet
- {
- \notes {
- \time 3/4 \mark "72"
-<< s1*0^"all" R4*3*11 >>
- \mark "73"
- R4*3*11 \mark "74"
- d2 r4
-
-
- }}}
- \paper { raggedright = ##t }
-}
-
-
*/
Moment *dt = unsmob_moment (rc->get_grob_property ("measure-length"));
if (dt)
*/
Moment *dt = unsmob_moment (rc->get_grob_property ("measure-length"));
if (dt)
- delta_t = delta_t <? *dt;
+ {
+ delta_t = delta_t <? *dt;
+
+ /*
+ The following is an extra safety measure, such that
+ the length of a mmrest event doesn't cause havoc.
+ */
+ shortest_playing_len = shortest_playing_len <? *dt;
+ }