X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fspacing-engraver.cc;h=750df9d976f74ec7b0ba08cbd0cecaeab5d2b610;hb=eac874ad80855c7f8372c7893394fd63371a7be1;hp=ad49a345b6de47eae4ed06cb6854e4003e899652;hpb=a276a19dc6bd57832db3107f2f2cbb04cb4677b6;p=lilypond.git diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index ad49a345b6..750df9d976 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -1,9 +1,20 @@ /* - spacing-engraver.cc -- implement Spacing_engraver + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1999--2010 Han-Wen Nienhuys - (c) 1999--2007 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "engraver.hh" @@ -174,7 +185,7 @@ Spacing_engraver::add_starter_duration (Grob_info i) Stream_event *r = i.event_cause (); if (r && r->in_event_class ("rhythmic-event")) { - Moment len = get_event_length (r); + Moment len = get_event_length (r, now_); Rhythmic_tuple t (i, now_mom () + len); now_durations_.push_back (t); } @@ -211,6 +222,7 @@ Spacing_engraver::stop_translation_timestep () Stream_event *ev = playing_durations_[i].info_.event_cause (); if (ev) { + Moment now = now_mom (); Moment m = get_event_length (ev); shortest_playing = min (shortest_playing, m); } @@ -261,13 +273,18 @@ ADD_ACKNOWLEDGER (Spacing_engraver, rhythmic_head); ADD_ACKNOWLEDGER (Spacing_engraver, rhythmic_grob); ADD_TRANSLATOR (Spacing_engraver, - "make a SpacingSpanner and do " - "bookkeeping of shortest starting and playing notes ", + /* doc */ + "Make a @code{SpacingSpanner} and do bookkeeping of shortest" + " starting and playing notes.", + + /* create */ + "SpacingSpanner ", - /* create */ "SpacingSpanner", /* read */ "currentMusicalColumn " "currentCommandColumn " - "proportionalNotationDuration", + "proportionalNotationDuration ", - /* write */ ""); + /* write */ + "" + );