X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Frest-engraver.cc;h=f4e2b08ebf4a6ce2319b64b7e0905f3ddbcf3f65;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=b59acf73f4d5bda1dd6a0e3b9c715a0695ee6378;hpb=cc676c5aadd45985251b5d60fa23eed1ed98f6e6;p=lilypond.git diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index b59acf73f4..f4e2b08ebf 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2006 Han-Wen Nienhuys + (c) 1997--2008 Han-Wen Nienhuys */ #include "engraver.hh" @@ -11,6 +11,7 @@ #include "dots.hh" #include "duration.hh" #include "item.hh" +#include "pitch.hh" #include "rhythmic-head.hh" #include "staff-symbol-referencer.hh" #include "stream-event.hh" @@ -54,29 +55,8 @@ Rest_engraver::process_music () if (rest_event_ && !rest_) { rest_ = make_item ("Rest", rest_event_->self_scm ()); - - int durlog = unsmob_duration (rest_event_->get_property ("duration"))->duration_log (); - - rest_->set_property ("duration-log", - scm_from_int (durlog)); - - int dots = unsmob_duration (rest_event_->get_property ("duration"))->dot_count (); - - if (dots) - { - dot_ = make_item ("Dots", SCM_EOL); - - Rhythmic_head::set_dots (rest_, dot_); - dot_->set_parent (rest_, Y_AXIS); - dot_->set_property ("dot-count", scm_from_int (dots)); - } - Pitch *p = unsmob_pitch (rest_event_->get_property ("pitch")); - /* - This is ridiculous -- rests don't have pitch, but we act as if - our nose is bleeding. - */ if (p) { int pos = p->steps (); @@ -97,8 +77,15 @@ Rest_engraver::listen_rest (Stream_event *ev) } ADD_TRANSLATOR (Rest_engraver, - /* doc */ "", - /* create */ "Rest Dots", - /* accept */ "rest-event", - /* read */ "middleCPosition", - /* write */ ""); + /* doc */ + "Engrave rests.", + + /* create */ + "Rest ", + + /* read */ + "middleCPosition ", + + /* write */ + "" + );