From: Han-Wen Nienhuys Date: Fri, 13 Feb 2004 20:08:15 +0000 (+0000) Subject: * lily/spacing-spanner.cc: bound shortest_playing_len by X-Git-Tag: release/2.1.23~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b701cf00d70110479e8fe8afddda2756ab77f51f;p=lilypond.git * lily/spacing-spanner.cc: bound shortest_playing_len by measure_length * lily/spacing-engraver.cc (acknowledge_grob): ignore multi-measure events for spacing computation. * input/GNUmakefile (SUBDIRS): remove ascii-art --- diff --git a/ChangeLog b/ChangeLog index 5bdb4069bf..d872f1cd09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2004-02-13 Han-Wen Nienhuys + * 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. diff --git a/input/regression/multi-measure-rest-spacing.ly b/input/regression/multi-measure-rest-spacing.ly new file mode 100644 index 0000000000..6ccb8b9a45 --- /dev/null +++ b/input/regression/multi-measure-rest-spacing.ly @@ -0,0 +1,18 @@ +\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 + } + } diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 33a02b3f90..9caf9f100b 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -169,7 +169,6 @@ Multi_measure_rest_engraver::stop_translation_timestep () } } - SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index 109a306321..e2dbd037a6 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -105,7 +105,8 @@ Spacing_engraver::acknowledge_grob (Grob_info i) 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"))) return; /* diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 666253aeeb..1f18c4939a 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -505,7 +505,7 @@ Spacing_spanner::find_shortest (Grob *me, Link_array const &cols) (different time sigs) than others, and should be spaced differently. */ void -Spacing_spanner::do_measure (Rational shortest, Grob*me, Link_array *cols) +Spacing_spanner::do_measure (Rational global_shortest, Grob*me, Link_array *cols) { Real headwid = robust_scm2double (me->get_grob_property ("spacing-increment"), 1); @@ -519,7 +519,7 @@ Spacing_spanner::do_measure (Rational shortest, Grob*me, Link_array *cols) if (!Paper_column::is_musical (l)) { - breakable_column_spacing (me, l, r, shortest); + breakable_column_spacing (me, l, r, global_shortest); /* @@ -532,20 +532,20 @@ Spacing_spanner::do_measure (Rational shortest, Grob*me, Link_array *cols) Item *rb = r->find_prebroken_piece (LEFT); if (lb) - breakable_column_spacing (me, lb,r, shortest); + breakable_column_spacing (me, lb,r, global_shortest); if (rb) - breakable_column_spacing (me, l, rb, shortest); + breakable_column_spacing (me, l, rb, global_shortest); if (lb && rb) - breakable_column_spacing (me, lb, rb, shortest); + breakable_column_spacing (me, lb, rb, global_shortest); continue ; } - 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)) - musical_column_spacing (me, lc, rb, headwid, shortest); + musical_column_spacing (me, lc, rb, headwid, global_shortest); } } @@ -555,10 +555,10 @@ Spacing_spanner::do_measure (Rational shortest, Grob*me, Link_array *cols) 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; - 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; @@ -873,38 +873,25 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc, 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. - - 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) - delta_t = delta_t