]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorhanwen <hanwen>
Sat, 10 Jan 2004 20:19:05 +0000 (20:19 +0000)
committerhanwen <hanwen>
Sat, 10 Jan 2004 20:19:05 +0000 (20:19 +0000)
23 files changed:
ChangeLog
lily/breathing-sign-engraver.cc
lily/clef-engraver.cc
lily/custos-engraver.cc
lily/dynamic-engraver.cc
lily/extender-engraver.cc
lily/gregorian-ligature-engraver.cc
lily/horizontal-bracket-engraver.cc
lily/hyphen-engraver.cc
lily/ligature-engraver.cc
lily/lyric-engraver.cc
lily/mark-engraver.cc
lily/metronome-engraver.cc
lily/piano-pedal-engraver.cc
lily/rhythmic-column-engraver.cc
lily/script-column-engraver.cc
lily/script-engraver.cc
lily/slur-engraver.cc
lily/span-dynamic-performer.cc
lily/tab-note-heads-engraver.cc
lily/text-engraver.cc
lily/text-spanner-engraver.cc
lily/translator.cc

index 65d186628d98024a9a8a06b32d90d8f2362ca8aa..d7173ad4280ae8ae120fcfeba2f90b5f7beeb5d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-01-10  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/*.cc: remove superfluous start_translation_timestep() calls.
+
        * lily/translator-group.cc (get_simple_trans_list): 
        new function; construct simple_trans_list_ lazily.
        
index 3f8acc774a46f19df4dbe8dd705396ee99df3c5d..7d49c31d731667c475f90e0ac2eaadfc7d1b8f34 100644 (file)
@@ -30,7 +30,6 @@ protected:
   virtual bool try_music (Music *req);
   virtual void process_acknowledged_grobs ();
   virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
 
 private:
   Music * breathing_sign_req_;
@@ -71,11 +70,6 @@ Breathing_sign_engraver::stop_translation_timestep ()
       typeset_grob (breathing_sign_);
       breathing_sign_ = 0;
     }
-}
-
-void
-Breathing_sign_engraver::start_translation_timestep ()
-{
   breathing_sign_req_ = 0;
 }
 
index 44b8be7cba363f994cc9509347142efe82e94de5..6ffa8a9fe7f937667ef4fc5e31032fed1ab32ad7 100644 (file)
@@ -27,7 +27,6 @@ public:
 
 protected:
   virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
   virtual void process_music ();
   virtual void acknowledge_grob (Grob_info);
 private:
@@ -190,11 +189,6 @@ Clef_engraver::stop_translation_timestep ()
     }
 }
 
-void
-Clef_engraver::start_translation_timestep ()
-{
-}
-
 
 
 ENTER_DESCRIPTION(Clef_engraver,
index ed50050923d1a61dda4c84ab526382ea0923b866..46c82969c60fc7a89f35082eed9876fef7c65bf8 100644 (file)
@@ -25,7 +25,6 @@ class Custos_engraver : public Engraver
 {
 public:
 TRANSLATOR_DECLARATIONS(  Custos_engraver);
-  virtual void start_translation_timestep ();
   virtual void acknowledge_grob (Grob_info);
   virtual void process_acknowledged_grobs ();
   virtual void stop_translation_timestep ();
@@ -47,22 +46,17 @@ Custos_engraver::Custos_engraver ()
 
 void
 Custos_engraver::stop_translation_timestep ()
-{
-  /*
-    delay typeset until we're at the next moment, so we can silence custodes at the end of the piece.
-   */
-}
-
-void
-Custos_engraver::start_translation_timestep ()
 {
   for (int i = custodes_.size (); i--;)
     {
       typeset_grob (custodes_[i]);
     }
-  custodes_.clear ();
-  pitches_.clear ();
 
+  /*
+    delay clear until we're at the next moment, so we can silence
+    custodes at the end of the piece.
+   */
+  pitches_.clear ();
   custos_permitted = false;
 }
 
@@ -139,7 +133,6 @@ Custos_engraver::finalize ()
   for (int i = custodes_.size (); i--;)
     {
       custodes_[i]->suicide ();
-      typeset_grob (custodes_[i]);
     }
   custodes_.clear ();
 }
index a8bb1d2f899d06d0e721e3369d9fdb3cd9615ce9..478339ea7c118fd61a9bbc81f4fb06db4332805b 100644 (file)
@@ -64,7 +64,6 @@ protected:
   virtual bool try_music (Music *req);
   virtual void stop_translation_timestep ();
   virtual void process_music ();  
-  virtual void start_translation_timestep ();
 };
 
 
@@ -84,14 +83,6 @@ Dynamic_engraver::Dynamic_engraver ()
   accepted_spanreqs_drul_[STOP] = 0;
 }
 
-void
-Dynamic_engraver::start_translation_timestep ()
-{
-  script_ev_ = 0;
-  accepted_spanreqs_drul_[START] = 0;
-  accepted_spanreqs_drul_[STOP] = 0;
-}
-
 bool
 Dynamic_engraver::try_music (Music * m)
 {
@@ -302,6 +293,10 @@ Dynamic_engraver::stop_translation_timestep ()
       line_spanner_ =0;
       typeset_all ();
     }
+
+  script_ev_ = 0;
+  accepted_spanreqs_drul_[START] = 0;
+  accepted_spanreqs_drul_[STOP] = 0;
 }
 
 void
index eb2b31f7aa058f23e098b47ab8ca47dfac865d90..9279849bb265468ac0830086665fed6598855d6a 100644 (file)
@@ -26,7 +26,6 @@ protected:
   virtual void finalize ();
   virtual bool try_music (Music*);
   virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
   virtual void process_music ();
 private:
 
@@ -116,15 +115,12 @@ Extender_engraver::stop_translation_timestep ()
   if (extender_)
     finished_extender_ = extender_;
   extender_ = 0;
-}
 
-void
-Extender_engraver::start_translation_timestep ()
-{
   ev_ = 0;
 }
 
 
+
 ENTER_DESCRIPTION(Extender_engraver,
 /* descr */       "Create lyric extenders",
 /* creats*/       "LyricExtender",
index b1c1a826baf0ec230f51d050dabba46e3d1fb57c..98e7fddc5c40968a74132d614166dc18accb2b58 100644 (file)
@@ -263,9 +263,9 @@ Gregorian_ligature_engraver::build_ligature (Spanner *ligature,
 }
 
 void
-Gregorian_ligature_engraver::start_translation_timestep ()
+Gregorian_ligature_engraver::stop_translation_timestep ()
 {
-  Ligature_engraver::start_translation_timestep ();
+  Ligature_engraver::stop_translation_timestep ();
   pes_or_flexa_req_ = 0;
 }
 
index 3db54efbf2b8be83529c188fca0d1e5d86bb1bc3..e86c7553bb94656b255eeccb2b74c25524c96230 100644 (file)
@@ -23,7 +23,6 @@ public:
   int push_count_;
 
   virtual  bool try_music(Music*);
-  virtual void start_translation_timestep ();
   virtual void stop_translation_timestep ();
   virtual  void process_music ();
   virtual  void acknowledge_grob (Grob_info);
@@ -43,12 +42,6 @@ Horizontal_bracket_engraver::Horizontal_bracket_engraver()
   push_count_ = 0;
 }
 
-void
-Horizontal_bracket_engraver::start_translation_timestep()
-{
-  pop_count_ = 0;
-  push_count_ = 0;
-}
 
 bool
 Horizontal_bracket_engraver::try_music (Music *m)
@@ -121,6 +114,8 @@ Horizontal_bracket_engraver::stop_translation_timestep ()
       if (bracket_stack_.size())
        typeset_grob (bracket_stack_.pop());
     }
+  pop_count_ = 0;
+  push_count_ = 0;
 }
 
 
index b5f7fd1e2c8e9520bf2f5c260ea05fb85d8d14cc..8282baa5daf280ae3ced551ccacaeaec0d710dd0 100644 (file)
@@ -36,7 +36,6 @@ protected:
   virtual void finalize ();
   virtual bool try_music (Music*);
   virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
   virtual void process_acknowledged_grobs ();
 private:
 
@@ -121,11 +120,6 @@ Hyphen_engraver::stop_translation_timestep ()
       last_lyric_ = current_lyric_;
       current_lyric_ =0;
     }
-}
-
-void
-Hyphen_engraver::start_translation_timestep ()
-{
   req_ = 0;
 }
 
index e355e5c3ece1ed2f50bd1315fbfc0b0ece872f19..8f5972177393298a2aadb4c0d0a2b304dcf3f339 100644 (file)
@@ -218,13 +218,6 @@ Ligature_engraver::process_music ()
     }
 }
 
-void
-Ligature_engraver::start_translation_timestep ()
-{
-  reqs_drul_[START] = 0;
-  reqs_drul_[STOP] = 0;
-}
-
 void
 Ligature_engraver::typeset_ligature (Spanner *, Array<Grob_info>)
 {
@@ -242,6 +235,9 @@ Ligature_engraver::stop_translation_timestep ()
       finished_primitives_.clear ();
       finished_ligature_ = 0;
     }
+
+  reqs_drul_[START] = 0;
+  reqs_drul_[STOP] = 0;
 }
 
 void
index 33ced391727d08548a77fa19ddf1473864f8b8ee..850326cb57d7cfd8b5a10522bb926db916eeb12f 100644 (file)
@@ -24,7 +24,6 @@ protected:
   virtual void stop_translation_timestep ();
   virtual bool try_music (Music *);
   virtual void process_music ();
-  virtual void start_translation_timestep ();
   
 public:
   TRANSLATOR_DECLARATIONS(Lyric_engraver);
@@ -75,11 +74,6 @@ Lyric_engraver::stop_translation_timestep ()
       typeset_grob (text_);
       text_ =0;
     }
-}
-
-void
-Lyric_engraver::start_translation_timestep ()
-{
   req_ =0;
 }
 
index dc75369fc7aedfc5bbd2d82179a62d82143f82df..f2808db11966c7d4ed65e7aeb119b59822ea36ae 100644 (file)
@@ -37,7 +37,6 @@ protected:
   virtual void acknowledge_grob (Grob_info);
   void create_items (Music*);
   virtual bool try_music (Music *req);
-  virtual void start_translation_timestep ();
   virtual void process_music ();
   
 private:
@@ -78,6 +77,7 @@ Mark_engraver::stop_translation_timestep ()
       typeset_grob (text_);
       text_ =0;
     }
+  mark_req_ = 0;
 }
 
 
@@ -92,13 +92,6 @@ Mark_engraver::create_items (Music *rq)
 }
 
 
-void
-Mark_engraver::start_translation_timestep ()
-{
-  mark_req_ = 0;
-}
-
-
 bool
 Mark_engraver::try_music (Music* r)
 {
index 32d15cafe8b15c9993ac1db1c6f9c807ea2bb9c7..80fe67837bca915bf9b83e59ed868f7585567215 100644 (file)
@@ -69,6 +69,7 @@ Metronome_mark_engraver::stop_translation_timestep ()
       typeset_grob (text_);
       text_ =0;
     }
+  mark_req_ = 0;
 }
 
 
@@ -84,11 +85,6 @@ Metronome_mark_engraver::create_items (Music *rq)
   announce_grob(text_, rq->self_scm());
 }
 
-void
-Metronome_mark_engraver::start_translation_timestep ()
-{
-  mark_req_ = 0;
-}
 
 bool
 Metronome_mark_engraver::try_music (Music* r)
index 5204f51f68e4683468252beac344157907eb8726..0b4f957b9d05c39d6e71445381928d280ca7debc 100644 (file)
@@ -67,7 +67,6 @@ protected:
   virtual void finalize ();
   virtual bool try_music (Music*);
   virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
   virtual void acknowledge_grob (Grob_info);
   virtual void process_music ();
 
@@ -483,6 +482,12 @@ Piano_pedal_engraver::stop_translation_timestep ()
     }
   
   typeset_all ();
+
+  for (Pedal_info*p = info_list_; p->name_; p ++)
+    {
+      p->event_drul_[STOP] = 0;
+      p->event_drul_[START] = 0;
+    }
 }
 
 
@@ -556,16 +561,6 @@ Piano_pedal_engraver::typeset_all ()
     }
 }
 
-void
-Piano_pedal_engraver::start_translation_timestep ()
-{
-  for (Pedal_info*p = info_list_; p->name_; p ++)
-    {
-      p->event_drul_[STOP] = 0;
-      p->event_drul_[START] = 0;
-    }
-}
-
 ENTER_DESCRIPTION (Piano_pedal_engraver,
 /* descr */       "Engrave piano pedal symbols and brackets.",
 /* creats*/       "SostenutoPedal SustainPedal UnaCordaPedal SostenutoPedalLineSpanner SustainPedalLineSpanner UnaCordaPedalLineSpanner",
index 998717c6639e0a3c3121912cba602d35d1e16fad..324d37ebc1728b876d4a1ad7ad90aa1dfc44e7f5 100644 (file)
@@ -61,7 +61,6 @@ protected:
   virtual void acknowledge_grob (Grob_info);
   virtual void process_acknowledged_grobs ();
   virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
 };
 
 
@@ -164,11 +163,7 @@ Rhythmic_column_engraver::stop_translation_timestep ()
       last_spacing_ = spacing_;
       spacing_ =0;
     }
-}
-
-void
-Rhythmic_column_engraver::start_translation_timestep ()
-{
+  
   dotcol_ =0;
   stem_ =0;
 }
index 9ef23f328a30f949eae80275c1a2c66d312db8cd..a35b401815167ddc22ebc7bb42b62e316ff11535 100644 (file)
@@ -26,7 +26,6 @@ protected:
   virtual void acknowledge_grob (Grob_info);
   virtual void process_acknowledged_grobs ();
   virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
 };
 
 
@@ -43,13 +42,7 @@ Script_column_engraver::stop_translation_timestep ()
       typeset_grob (scol_);
       scol_ =0;
     }
-}
-
-void
-Script_column_engraver::start_translation_timestep ()
-{
   scripts_.clear ();
-
 }
 
 void
index 9b7e1e769c5f1b391ca073ed4fd792f617ceaaeb..bfce6c5a1faeaecf8ef48318fc4f1c62802f6505 100644 (file)
@@ -34,7 +34,6 @@ public:
 protected:
   virtual bool try_music (Music*);
   virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
   virtual void process_music ();
   virtual void acknowledge_grob (Grob_info);
 };
@@ -210,12 +209,6 @@ Script_engraver::stop_translation_timestep ()
   scripts_.clear ();
 }
 
-void
-Script_engraver::start_translation_timestep ()
-{
-  scripts_.clear ();
-}
-
 
 
 Script_engraver::Script_engraver(){}
index baeda35fda7b213b15cb85b73bc3a923212fd751..132ea54ca2f09e6794e9c676b66be41cba6bd155 100644 (file)
@@ -194,11 +194,6 @@ Slur_engraver::stop_translation_timestep ()
       typeset_grob (end_slurs_[i]);
     }
   end_slurs_.clear ();
-}
-
-void
-Slur_engraver::start_translation_timestep ()
-{
   new_slur_evs_.clear ();
 }
 
index 740eb1a648980c7fce6872cba397e5e4953e084d..854aa59d471a279ea5218289b93b79d8e7b9bbc3 100644 (file)
@@ -30,7 +30,6 @@ protected:
   virtual void acknowledge_audio_element (Audio_element_info);
   virtual void process_music ();
   virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
 
 private:
   Audio_dynamic* audio_;
@@ -161,13 +160,10 @@ Span_dynamic_performer::stop_translation_timestep ()
       play_element (audio_);
       audio_ = 0;
     }
-}
 
-void
-Span_dynamic_performer::start_translation_timestep ()
-{
   span_req_l_drul_[STOP] = 0;
   span_req_l_drul_[START] = 0;
+
 }
 
 bool
index e0ba6ec18efc48126ef1a627c911b8f87e2b710c..fe24b7a53b4e2d3ad249ac68ff4a77a76fd0be23 100644 (file)
@@ -30,7 +30,6 @@ public:
   TRANSLATOR_DECLARATIONS(Tab_note_heads_engraver);
 
 protected:
-  virtual void start_translation_timestep ();
   virtual bool try_music (Music *event) ;
   virtual void process_music ();
 
@@ -180,11 +179,6 @@ Tab_note_heads_engraver::stop_translation_timestep ()
   tabstring_events_.clear ();
 }
 
-void
-Tab_note_heads_engraver::start_translation_timestep ()
-{
-}
-
 
 ENTER_DESCRIPTION(Tab_note_heads_engraver,
 /* descr */       "Generate one or more tablature noteheads from Music of type NoteEvent.",
index fe64b4473dcfb0be833ce17dbfc5dc35eb313c8b..5cdc157f0dbf9daab9f0b789c2d5dcca45de762f 100644 (file)
@@ -133,11 +133,6 @@ Text_engraver::stop_translation_timestep ()
       typeset_grob (ti);
     }
   texts_.clear ();
-}
-
-void
-Text_engraver::start_translation_timestep ()
-{
   reqs_.clear ();
 }
 
index bbd3ef376cd97db08a839562b47955be42fd3ccf..52893847f8a2d0027112ae1941094138b3b58a34 100644 (file)
@@ -20,7 +20,6 @@ protected:
   virtual void acknowledge_grob (Grob_info);
   virtual bool try_music (Music *);
   virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
   virtual void process_music ();
 
 private:
@@ -41,13 +40,6 @@ Text_spanner_engraver::Text_spanner_engraver ()
   req_drul_[STOP] = 0;
 }
 
-void
-Text_spanner_engraver::start_translation_timestep ()
-{
-  req_drul_[START] = 0;
-  req_drul_[STOP] = 0;
-}
-
 bool
 Text_spanner_engraver::try_music (Music *m)
 {
@@ -147,6 +139,8 @@ Text_spanner_engraver::stop_translation_timestep ()
     }
 
   typeset_all ();
+  req_drul_[START] = 0;
+  req_drul_[STOP] = 0;
 }
 
 void
index 6f323bbfed844e4e7ed689a1d8b5080e0e37b2be..e27c740a039a7587f510fbd01431816f24b2852f 100644 (file)
@@ -88,6 +88,15 @@ Translator:: stop_translation_timestep ()
 {
 }
 
+/*
+  this function has 2 properties
+
+  - It is called before try_music()
+
+  - It is called before any user information enters the translators.
+  (i.e. any \property is not processed yet.)
+
+  */
 void
 Translator::start_translation_timestep ()
 {