From: Han-Wen Nienhuys Date: Mon, 1 Apr 2002 19:19:27 +0000 (+0000) Subject: '' X-Git-Tag: release/1.5.50~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=005f1b6ee133fc90fd0f31acdeeb76bba62c058a;p=lilypond.git '' --- diff --git a/ChangeLog b/ChangeLog index 4b0b8713c1..7f1be4e3c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-04-01 Han-Wen + + * lily/rhythmic-column-engraver.cc (acknowledge_grob): don't make + note column for notes/stems/dots that already have parents. Fixes + nested grace contexts. + 2002-04-01 Jan Nieuwenhuizen * input/mozart-hrn-3.ly: Tweak Slur.beautiful, so that we don't @@ -12,6 +18,11 @@ 2002-04-01 Han-Wen + * input/regression/spacing-grace-duration.ly: new file + + * lily/spacing-engraver.cc (acknowledge_grob): ignore grace notes + for shortest durations. + * lily/multi-measure-rest.cc (set_spacing_rods): tune rods to the extent of the mm rest. diff --git a/Documentation/regression-test.tely b/Documentation/regression-test.tely index 5ff30ffc43..fb74d544cd 100644 --- a/Documentation/regression-test.tely +++ b/Documentation/regression-test.tely @@ -262,6 +262,8 @@ Grace note do weird things with timing. Fragile. @lilypondfile[printfilename]{spacing-short-notes.ly} +@lilypondfile[printfilename]{spacing-grace-duration.ly} + @lilypondfile[printfilename]{lyrics-bar.ly} @lilypondfile[printfilename]{spacing-knee.ly} diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index 89ed54beb1..80e483dfc6 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -132,15 +132,17 @@ void Rhythmic_column_engraver::acknowledge_grob (Grob_info i) { Item * item = dynamic_cast (i.grob_l_); - if (item && Stem::has_interface (item)) + if (!item || item->get_parent (X_AXIS)) + return ; + if (Stem::has_interface (item)) { stem_l_ = item; } - else if (item && Rhythmic_head::has_interface (item)) + else if (Rhythmic_head::has_interface (item)) { rhead_l_arr_.push (item); } - else if (item && Dot_column::has_interface (item)) + else if (Dot_column::has_interface (item)) { dotcol_l_ = item; } diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index 00fce0be69..1da3613a1f 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -43,7 +43,7 @@ class Spacing_engraver : public Engraver PQueue playing_durations_; Array now_durations_; Array stopped_durations_; - + Moment now_; Spanner * spacing_p_; TRANSLATOR_DECLARATIONS(Spacing_engraver); @@ -100,11 +100,18 @@ Spacing_engraver::acknowledge_grob (Grob_info i) if (to_boolean (i.grob_l_->get_grob_property ("non-rhythmic"))) return; - - if (Rhythmic_req * r = dynamic_cast (i.music_cause ())) + + /* + only pay attention to durations that are not grace notes. + */ + if (!now_.grace_part_) { - Rhythmic_tuple t (i, now_mom () + r->length_mom ()); - now_durations_.push (t); + if (Rhythmic_req * r = dynamic_cast (i.music_cause ())) + { + Moment len = r->length_mom (); + Rhythmic_tuple t (i, now_mom () + len); + now_durations_.push (t); + } } } @@ -116,10 +123,7 @@ Spacing_engraver::stop_translation_timestep () for (int i=0; i < playing_durations_.size (); i++) { Moment m = (playing_durations_[i].info_.music_cause ())->length_mom (); - if (m.to_bool ()) - { - shortest_playing = shortest_playing const &cols) max_count = counts[i]; } - printf ("duration %d/%d, count %d\n", durations[i].num (), durations[i].den (), counts[i]); + // printf ("duration %d/%d, count %d\n", durations[i].num (), durations[i].den (), counts[i]); } /*