]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/include/music-iterator.hh (class Music_iterator): remove
authorhanwen <hanwen>
Wed, 4 Feb 2004 16:47:56 +0000 (16:47 +0000)
committerhanwen <hanwen>
Wed, 4 Feb 2004 16:47:56 +0000 (16:47 +0000)
Music_iterator::skip and Music_iterator::get_pending_events from
interface. Rename report_to -> get_outlet

* lily/auto-change-iterator.cc: move contents from
new-auto-change-iterator.cc from

* lily/new-auto-change-iterator.cc (process): new file.

* lily/new-part-combine-iterator.cc (kill_mmrest): new function.

33 files changed:
ChangeLog
Documentation/topdocs/NEWS.texi
input/test/ac-extra-voice.ly
input/test/slur-ugly.ly
lily/apply-context-iterator.cc
lily/auto-change-iterator.cc
lily/bar-check-iterator.cc
lily/change-iterator.cc
lily/chord-tremolo-iterator.cc
lily/context-specced-music-iterator.cc
lily/event-chord-iterator.cc
lily/folded-repeat-iterator.cc
lily/include/event-chord-iterator.hh
lily/include/interpretation-context-handle.hh
lily/include/music-iterator.hh
lily/include/music-wrapper-iterator.hh
lily/include/sequential-iterator.hh
lily/include/simple-music-iterator.hh
lily/include/simultaneous-music-iterator.hh
lily/interpretation-context-handle.cc
lily/lyric-combine-music-iterator.cc
lily/music-iterator.cc
lily/music-wrapper-iterator.cc
lily/new-lyric-combine-music-iterator.cc
lily/new-part-combine-iterator.cc
lily/output-property-music-iterator.cc
lily/percent-repeat-iterator.cc
lily/property-iterator.cc
lily/sequential-iterator.cc
lily/simple-music-iterator.cc
lily/simultaneous-music-iterator.cc
lily/time-scaled-music-iterator.cc
lily/unfolded-repeat-iterator.cc

index 5073100ec5fcf54d7348fce8731ee2faff369c00..90100f1beea64060d7a70286700d7b53f44d0d72 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-02-04  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/include/music-iterator.hh (class Music_iterator): remove
+       Music_iterator::skip and Music_iterator::get_pending_events from
+       interface. Rename report_to -> get_outlet 
+
        * lily/auto-change-iterator.cc: move contents from
        new-auto-change-iterator.cc from
 
index 0ca5c7bb2e86925ec6c622bea5670ffef38c208e..6a9696913357db5152254e1fe6d160a301ee4b0d 100644 (file)
@@ -17,6 +17,14 @@ Version 2.1.13
 @end ignore
 
 @itemize @bullet
+
+@item The automatic staff changer was internally rewritten. The new
+syntax  for this  is
+
+@example
+  \autochange @var{the music}
+@end example
+
 @item The ergonomic syntax of @code{\markup} now has an equivalent in
 Scheme. The @code{markup*} macro creates such objects; the following
 two markup commands are equivalent:
@@ -52,7 +60,7 @@ sizes.
 @item A  more cleanly constructed part combiner has been installed.
 It is more robust and less buggy. The part-combiner can be used with
 @example
-  \newpartcombine @var{mus1} @var{mus2}
+  \partcombine @var{mus1} @var{mus2}
 @end example
 
 @noindent
index cba555998445aa614434051135b56d44d4dade41..aade68342cc49b9702a835f07e03d2e226cada51 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.18"
 
 %% I don't know what this example is supposed to do.  delete it?
 %% It shows how to use the autochange feature together with an extra
@@ -40,7 +40,7 @@ accompany = \repeat unfold 4  \basloopje
        \context Staff=down<<
            \global
            \clef bass
-           \autochange Staff \context Voice \accompany
+           \autochange  \context Voice \accompany
        >>
     >>
 
index ae3b58535b9483461e1910fae3d5f64c2485f7ab..a16cddebb27b3659eddfe015213837dfb3b8e2a2 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.1.7"
+\version "2.1.18"
 
 \header { texidoc="@cindex Slur Ugly
 You can get ugly slurs, if you want. "
@@ -15,7 +15,7 @@ baseWalk = \notes \relative c {
     \context Staff=up { s1 * 6/4 }
     \context Staff=down <<
       \clef bass
-      \autochange Staff \context Voice \baseWalk
+      \autochange  \context Voice \baseWalk
     >>
   >>
   \paper {
index 3b42c54fcb081e2df06ffd010dff030e11ba4a99..feb3a8346076a0ef9437d1c2b72c995c397e71e9 100644 (file)
@@ -20,7 +20,7 @@ Apply_context_iterator::process (Moment m)
 {
   SCM proc = get_music ()->get_mus_property ("procedure");
 
-  scm_call_1 (proc, report_to()->self_scm());
+  scm_call_1 (proc, get_outlet ()->self_scm());
   
   Simple_music_iterator::process(m);
 }
index f7da5c27803815aa11e26df9973361eb295340f8..f5bb1bbe39542c3afe5ab3d492ac8ea9fa6f4a35 100644 (file)
@@ -37,7 +37,7 @@ void
 Auto_change_iterator::change_to (Music_iterator *it, SCM to_type_sym,
                                 String to_id)
 {
-  Translator_group * current = it->report_to ();
+  Translator_group * current = it->get_outlet ();
   Translator_group * last = 0;
 
   /*
@@ -66,7 +66,7 @@ Auto_change_iterator::change_to (Music_iterator *it, SCM to_type_sym,
     if (last)
       {
        Translator_group * dest = 
-         it->report_to ()->find_create_translator (to_type_sym, to_id, SCM_EOL);
+         it->get_outlet ()->find_create_translator (to_type_sym, to_id, SCM_EOL);
        current->remove_translator (last);
        dest->add_used_group_translator (last);
       }
@@ -89,7 +89,7 @@ Auto_change_iterator::process (Moment m)
   Music_wrapper_iterator::process (m);
 
   
-  Moment now = report_to ()->now_mom ();
+  Moment now = get_outlet ()->now_mom ();
   Moment *splitm = 0;
   
   for (; gh_pair_p (split_list_); split_list_ = gh_cdr (split_list_))
index 16b03abf2c9fe43e4e788d9e08f2cdfe855c34b5..380edbf44800f41f7563b2d862bc33f9e34e5a52 100644 (file)
@@ -37,7 +37,7 @@ Bar_check_iterator::process (Moment m)
   Simple_music_iterator::process(m);
   if (!m.to_bool ())
     {
-      Translator_group *tr = report_to ();
+      Translator_group *tr = get_outlet ();
 
       SCM mp = tr->get_property ("measurePosition");
       SCM sync= tr->get_property ("barCheckSynchronize");
index 16e3f783a1cb831e043212b638aef603c40b9af5..cda98a09d1ee8375951c4aaf18b8a18e3b09690d 100644 (file)
@@ -26,8 +26,8 @@ Change_iterator::error (String reason)
     GUHG!
    */
   String warn2= "Change_iterator::process (): " 
-    + report_to ()->context_name () + " = `"
-    + report_to ()->id_string_ + "': ";
+    + get_outlet ()->context_name () + " = `"
+    + get_outlet ()->id_string_ + "': ";
   warning (warn2);
   get_music ()->origin ()->warning (warn1);
 }
@@ -38,7 +38,7 @@ Change_iterator::error (String reason)
 void
 Change_iterator::process (Moment m)
 {
-  Translator_group * current = report_to ();
+  Translator_group * current = get_outlet ();
   Translator_group * last = 0;
 
   SCM to_type = get_music ()->get_mus_property ("change-to-type");
@@ -65,7 +65,7 @@ Change_iterator::process (Moment m)
     if (last)
       {
        Translator_group * dest = 
-         report_to ()->find_create_translator (to_type, to_id, SCM_EOL);
+         get_outlet ()->find_create_translator (to_type, to_id, SCM_EOL);
        current->remove_translator (last);
        dest->add_used_group_translator (last);
       }
index ae9a17eb4674ae184c5507b7a92e7c9f73e81855..3de2ba5ba30226c124403c74f0a9179ab07cebd7 100644 (file)
@@ -71,7 +71,7 @@ Chord_tremolo_iterator::process (Moment m)
     {
       Music_iterator *yeah = try_music (get_music ());
       if (yeah)
-       set_translator (yeah->report_to ());
+       set_translator (yeah->get_outlet ());
       else
        get_music ()->origin ()->warning (_ ("no one to print a tremolos"));
     }
index c6751227bb90da0b3cef758d3d67cfb02a56a408..801f1b20dd743cf71e9580562b84d4c01bc8d021 100644 (file)
@@ -31,7 +31,7 @@ Context_specced_music_iterator::construct_children ()
   SCM ops = get_music ()->get_mus_property ("property-operations");
   
   Translator_group* a
-    = report_to ()->find_create_translator (ct, c_id, ops);
+    = get_outlet ()->find_create_translator (ct, c_id, ops);
 
   if (a)
     set_translator (a);
index ffb423bc6646c41a2da55ff6eb9661a83c7903a3..d45168d5733d89953384c1a24a31e7d4b96d748c 100644 (file)
@@ -24,12 +24,12 @@ Event_chord_iterator::Event_chord_iterator (Event_chord_iterator const &src)
 Translator_group*
 Event_chord_iterator::get_req_translator ()
 {
-  assert (report_to ());
-  if (report_to ()->is_bottom_context ())
-    return report_to ();
+  assert (get_outlet ());
+  if (get_outlet ()->is_bottom_context ())
+    return get_outlet ();
 
-  set_translator (report_to ()->get_default_interpreter ());
-  return report_to ();
+  set_translator (get_outlet ()->get_default_interpreter ());
+  return get_outlet ();
 }
 
 void
@@ -45,24 +45,9 @@ Event_chord_iterator::get_elt () const
   return (Event_chord*) get_music ();
 }
 
-SCM
-Event_chord_iterator::get_pending_events (Moment) const
-{
-  SCM s = SCM_EOL;
-  if (last_processed_mom_ < Moment (0))
-    {
-      Music_sequence * ms = dynamic_cast<Music_sequence*> (get_music ());
-     
-      for (SCM m = ms->music_list (); gh_pair_p (m); m = ly_cdr (m))
-       {
-         s = gh_cons (ly_car (m) , s);
-       }
-    }
-  return s;
-}
 
 void
-Event_chord_iterator::process (Moment m)
+Event_chord_iterator::process (Moment )
 {
   if (last_processed_mom_ < Moment (0))
     {
@@ -76,7 +61,6 @@ Event_chord_iterator::process (Moment m)
            mus->origin ()->warning (_f ("Junking event: `%s'", mus->name()));
        }
     }
-  skip (m);
 }
 
 IMPLEMENT_CTOR_CALLBACK (Event_chord_iterator);
index 40f46803269b5eb9c3b3233a56c9a1b57dbaebb3..9465184b6b98d01af0aaa3c98bcb949a6855d293 100644 (file)
@@ -8,11 +8,6 @@
  */
 
 
-/*
-   Folded repeats are a stupid idea at this point, so we refrain from
-   implementing get_pending_events () and skip ().
-*/
-
 #include "folded-repeat-iterator.hh"
 #include "repeated-music.hh"
 #include "music-list.hh"
@@ -132,7 +127,7 @@ Folded_repeat_iterator::enter_alternative ()
       */ 
       Simultaneous_music_iterator * s = new Simultaneous_music_iterator;
       s->separate_contexts_b_ = true;
-      s->init_translator (mus, report_to ());
+      s->init_translator (mus, get_outlet ());
       
       alternative_iter_ = s;
       alternative_iter_->construct_children ();
index ec436d88e1bd7aec0a4ed49c29b60c25b699184c..e3c5fa0d092c068dd4cd69d5db854325587c892f 100644 (file)
@@ -35,7 +35,6 @@ public:
   Event_chord_iterator ();
   Event_chord_iterator (Event_chord_iterator const&);
 
-  virtual SCM get_pending_events (Moment) const;
 protected:
   virtual void process (Moment);
   virtual void construct_children ();
index 6ab87d406409f8f318d5e78901b6242afd8ad817..d13e302b77e1aa2cf81b3c6db60a0639b54aae68 100644 (file)
@@ -21,11 +21,12 @@ public:
   bool try_music (Music *);
   void operator = (Interpretation_context_handle const&);
   Interpretation_context_handle (Interpretation_context_handle const&);
-  Translator_group * report_to () const;
+  Translator_group * get_outlet () const;
+
   int get_count () const;
   void quit ();
 private:
-  Translator_group * report_to_;
+  Translator_group * outlet_;
   void down ();
   void up (Translator_group*);
 };
index 0831317f38ea09b5459672f19b02832846b43d73..db992549562344fcc5c23c479eb083763e87d20a 100644 (file)
     * Typically this reports the music to an interpretation context,
     thus changing the state of the interpretation context.
 
-  get_pending_events (M) -- return all events starting at M (pre: no events
-    before M). No side-effects
-
-  skip (M) -- remove all events starting before M (leave the ones that
-    start M).  no side-effects on interpretation context
-
 
   TODO:
 
@@ -81,7 +75,7 @@ public:
   /**
     The translation unit that we this iterator is reporting  to now.
    */
-  Translator_group* report_to () const;
+  Translator_group* get_outlet () const;
 
   void set_translator (Translator_group*);
   
@@ -97,10 +91,7 @@ public:
   virtual bool ok () const;
 
   virtual bool run_always () const; 
-  virtual SCM get_pending_events (Moment until)const;
   virtual void process (Moment until);
-  virtual void skip (Moment until);
-
   virtual void derived_mark ()const;
   virtual void construct_children ();
   
index 4bd32a93d1303ad0277f57228c938493a1656467..a9baaf4de8fe35b29243723bd44e88037ddfead4 100644 (file)
@@ -34,7 +34,6 @@ public:
   virtual void do_quit(); 
   virtual bool ok () const;
   virtual SCM get_pending_events (Moment)const;
-  virtual void skip (Moment);
   virtual bool run_always () const;
 protected:
   virtual void process (Moment);
index 1ab1d00c5da4d816453f8801206b487b1196a000..2cef81e96e377135de91447eb87ff8dbf98d2be9 100644 (file)
@@ -65,8 +65,6 @@ public:
   virtual Moment pending_moment () const;
   virtual void do_quit(); 
   virtual bool ok () const;
-  virtual void skip (Moment);
-  virtual SCM get_pending_events (Moment)const;
 
 protected:
   virtual void process (Moment);
index fa0e09c614b6d313d9201e86afa2ff383a74bc70..88a1fa1b790dc13f8b6944c51af511be8fdd54b8 100644 (file)
@@ -29,8 +29,6 @@ public:
   virtual void process (Moment);
   virtual bool ok ()const;
   virtual Moment pending_moment ()const;
-
-  virtual void skip (Moment);
 };
 
 #endif /* SIMPLE_MUSIC_ITERATOR_HH */
index 446e3ae1e54aaf8b51b5e0aa4e42cbed578c8885..f602a823a3b079a605084cd70e77df9a5b99f6f9 100644 (file)
@@ -29,8 +29,6 @@ public:
   virtual Moment pending_moment () const;
   virtual void do_quit(); 
   virtual bool ok () const;
-  virtual SCM get_pending_events (Moment)const;
-  virtual void skip (Moment);
   virtual bool run_always () const;
   
 protected:
index dee2951851dcb695dc142e2e1b7b3e11652d0f5f..b617aa7544bfca6949565f24c12070c94e77cc14 100644 (file)
 
 Interpretation_context_handle::Interpretation_context_handle ()
 {
-  report_to_ =0;
+  outlet_ =0;
 }
 
 Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle const&s)
 {
-  report_to_ =0;
-  if (s.report_to_)
-    up (s.report_to_);
+  outlet_ =0;
+  if (s.outlet_)
+    up (s.outlet_);
 }
 
 Interpretation_context_handle*
 Interpretation_context_handle::clone () const
 {
   Interpretation_context_handle* handle = new Interpretation_context_handle;
-  handle->report_to_ = this->report_to_;
+  handle->outlet_ = this->outlet_;
   return handle;
 }
 
@@ -34,7 +34,7 @@ Interpretation_context_handle::~Interpretation_context_handle ()
   /*
     Don't do
 
-    if (report_to_)
+    if (outlet_)
       down ();
 
     with GC, this is asynchronous.
@@ -44,59 +44,59 @@ Interpretation_context_handle::~Interpretation_context_handle ()
 void
 Interpretation_context_handle::up (Translator_group*t)
 {
-  report_to_ = t;
+  outlet_ = t;
   t->iterator_count_ ++;
 }
 
 void
 Interpretation_context_handle::down ()
 {
-  report_to_->iterator_count_ --;
-  report_to_ = 0;
+  outlet_->iterator_count_ --;
+  outlet_ = 0;
 }
 
 void
 Interpretation_context_handle::quit ()
 {
-  if (report_to_)
+  if (outlet_)
     {
-      report_to_->iterator_count_ --;
-      report_to_ = 0;
+      outlet_->iterator_count_ --;
+      outlet_ = 0;
     }
 }
 
 bool
 Interpretation_context_handle::try_music (Music *m)
 {
-  return report_to_->try_music (m);
+  return outlet_->try_music (m);
 }
 
 void
 Interpretation_context_handle::operator = (Interpretation_context_handle const &s)
 {
-  set_translator (s.report_to_);
+  set_translator (s.outlet_);
 }
 
 void
 Interpretation_context_handle::set_translator (Translator_group*trans)
 {
-  if (report_to_ ==trans)
+  if (outlet_ ==trans)
     return;
-  if (report_to_)
+  if (outlet_)
     down ();
   if (trans)
     up (trans);
 }
 
 Translator_group*
-Interpretation_context_handle::report_to ()const
+Interpretation_context_handle::get_outlet () const
 {
   
-  return report_to_;
+  return outlet_;
 }
 
 int
-Interpretation_context_handle::get_count ()const
+Interpretation_context_handle::get_count () const
 {
-  return report_to_->iterator_count_ ;
+  return outlet_->iterator_count_ ;
 }
index 3b3e19ec7823da33daf0d358231e8d3d8740dec2..4124cfedb36f4ec2c4b1ad8f2b44cc0497d50979 100644 (file)
@@ -125,7 +125,7 @@ Lyric_combine_music_iterator::get_busy_status () const
   if (try_music (busy_req))
     return true;
   
-  Translator_group * tr = music_iter_->report_to ();
+  Translator_group * tr = music_iter_->get_outlet ();
 
   SCM grobs = tr->get_property ("busyGrobs");
   Moment now = tr->now_mom();
@@ -151,7 +151,7 @@ bool
 Lyric_combine_music_iterator::melisma_busy ()
 {
   /*
-    We can not read the property, since music_iter_->report_to() might
+    We can not read the property, since music_iter_->get_outlet () might
     not be the context that sets the melisma properties, but rather a
     parent context.
    */
index 7d53a9c70269f80ad6e33ca8eba0cfce8ffcee76..45d2f374dc811511a453a0c6dab6e8983d7e86ca 100644 (file)
@@ -40,9 +40,9 @@ Music_iterator::~Music_iterator ()
 }
 
 Translator_group* 
-Music_iterator::report_to () const
+Music_iterator::get_outlet () const
 {
-  return handle_.report_to ();
+  return handle_.get_outlet ();
 }
 
 void
@@ -73,16 +73,7 @@ Music_iterator::ok () const
   return false;
 }
 
-void
-Music_iterator::skip (Moment)
-{
-}
 
-SCM
-Music_iterator::get_pending_events (Moment)const
-{
-  return SCM_EOL;
-}
 
 SCM
 Music_iterator::get_static_get_iterator (Music *m)
@@ -132,14 +123,14 @@ Music_iterator::init_translator (Music *m, Translator_group *report)
 {
   music_ = m;
   assert (m);
-  if (! report_to ())
+  if (! get_outlet ())
     set_translator (report);
 }
 
 void
 Music_iterator::substitute_outlet (Translator_group*f, Translator_group *t)
 {
-  if (report_to () == f)
+  if (get_outlet () == f)
     set_translator (t);
   derived_substitute (f,t);
 }
@@ -155,7 +146,7 @@ Music_iterator::get_iterator (Music *m) const
   SCM ip = get_static_get_iterator (m);
   Music_iterator*p = unsmob_iterator (ip);
   
-  p->init_translator (m, report_to ());
+  p->init_translator (m, get_outlet ());
   
   p->construct_children ();
   return ip;
@@ -169,7 +160,7 @@ Music_iterator::get_iterator (Music *m) const
 Music_iterator*
 Music_iterator::try_music (Music *m) const
 {
-  bool b = report_to ()->try_music ((Music*)m); // ugh
+  bool b = get_outlet ()->try_music ((Music*)m); // ugh
   Music_iterator * it = b ? (Music_iterator*) this : 0;        // ugh
   if (!it)
     it = try_music_in_children (m);
@@ -206,8 +197,8 @@ Music_iterator::mark_smob (SCM smob)
     Careful with GC, although we intend the following as pointers
     only, we _must_ mark them.
    */
-  if (mus->report_to())
-    scm_gc_mark (mus->report_to()->self_scm());
+  if (mus->get_outlet ())
+    scm_gc_mark (mus->get_outlet ()->self_scm());
   if (mus->music_)
     scm_gc_mark (mus->music_->self_scm());
   
index be56471ad81ab0760b4be5d933fd6ae1ac8d34bc..4d794033d8cc692e7754da335cc041af4f01fe52 100644 (file)
@@ -59,11 +59,7 @@ Music_wrapper_iterator::ok () const
 {
   return child_iter_ && child_iter_->ok ();
 }
-void
-Music_wrapper_iterator::skip (Moment m)
-{
-  child_iter_->skip (m);
-}
+
 
 void
 Music_wrapper_iterator::process (Moment m)
@@ -71,11 +67,6 @@ Music_wrapper_iterator::process (Moment m)
   child_iter_->process (m);
 }
 
-SCM
-Music_wrapper_iterator::get_pending_events (Moment m)const
-{
-  return child_iter_->get_pending_events (m);
-}
 
 Moment
 Music_wrapper_iterator::pending_moment () const
index e7c2e84696ca45fcfc8b69fca5a09b902a518554..3442efb74b7422caff7b3ef27bc1e611b4fe068e 100644 (file)
@@ -164,7 +164,7 @@ New_lyric_combine_music_iterator::construct_children ()
   find_thread ();
   
   if (lyric_iter_)
-    lyrics_context_ = find_context_below (lyric_iter_->report_to (),
+    lyrics_context_ = find_context_below (lyric_iter_->get_outlet (),
                                          "LyricsVoice", "");
 
   /*
@@ -183,7 +183,7 @@ New_lyric_combine_music_iterator::find_thread ()
   
       if (gh_string_p (voice_name))
        {
-         Translator_group *t = report_to ();
+         Translator_group *t = get_outlet ();
          while (t && t->daddy_trans_)
            t = t->daddy_trans_;
 
index 872941f44422c6c51ebcc58ff72c29a643efdc31..05b837d1c2a3f50c14d3949c4b3c77df3d0611fc 100644 (file)
@@ -31,7 +31,6 @@ protected:
   virtual void do_quit(); 
   virtual void process (Moment);
 
-  virtual SCM get_pending_events (Moment)const;
   virtual Music_iterator *try_music_in_children (Music *) const;
 
   virtual bool ok () const;
@@ -152,10 +151,10 @@ New_pc_iterator::chords_together ()
     {
       playing_state_ = TOGETHER;
       state_ = TOGETHER;
-      first_iter_->substitute_outlet (one_.report_to (), shared_.report_to ());
-      first_iter_->substitute_outlet (null_.report_to (), shared_.report_to ());
-      second_iter_->substitute_outlet (two_.report_to (), shared_.report_to ());
-      second_iter_->substitute_outlet (null_.report_to (), shared_.report_to ());
+      first_iter_->substitute_outlet (one_.get_outlet (), shared_.get_outlet ());
+      first_iter_->substitute_outlet (null_.get_outlet (), shared_.get_outlet ());
+      second_iter_->substitute_outlet (two_.get_outlet (), shared_.get_outlet ());
+      second_iter_->substitute_outlet (null_.get_outlet (), shared_.get_outlet ());
     }
 }
 
@@ -181,13 +180,13 @@ New_pc_iterator::solo1 ()
   else
     {
       state_ = SOLO1;
-      first_iter_->substitute_outlet (null_.report_to (), shared_.report_to ());
-      first_iter_->substitute_outlet (one_.report_to (), shared_.report_to ());
+      first_iter_->substitute_outlet (null_.get_outlet (), shared_.get_outlet ());
+      first_iter_->substitute_outlet (one_.get_outlet (), shared_.get_outlet ());
 
-      second_iter_->substitute_outlet (two_.report_to (), null_.report_to ());
-      second_iter_->substitute_outlet (shared_.report_to (), null_.report_to ());
-      kill_mmrest (two_.report_to ());
-      kill_mmrest (shared_.report_to ());
+      second_iter_->substitute_outlet (two_.get_outlet (), null_.get_outlet ());
+      second_iter_->substitute_outlet (shared_.get_outlet (), null_.get_outlet ());
+      kill_mmrest (two_.get_outlet ());
+      kill_mmrest (shared_.get_outlet ());
 
       if (playing_state_ != SOLO1)
        {
@@ -210,13 +209,13 @@ New_pc_iterator::unisono (bool silent)
   else
     {
 
-      first_iter_->substitute_outlet (null_.report_to (), shared_.report_to ());
-      first_iter_->substitute_outlet (one_.report_to (), shared_.report_to ());
+      first_iter_->substitute_outlet (null_.get_outlet (), shared_.get_outlet ());
+      first_iter_->substitute_outlet (one_.get_outlet (), shared_.get_outlet ());
 
-      second_iter_->substitute_outlet (two_.report_to (), null_.report_to ());
-      second_iter_->substitute_outlet (shared_.report_to (), null_.report_to ());
-      kill_mmrest (two_.report_to ());
-      kill_mmrest (shared_.report_to ());
+      second_iter_->substitute_outlet (two_.get_outlet (), null_.get_outlet ());
+      second_iter_->substitute_outlet (shared_.get_outlet (), null_.get_outlet ());
+      kill_mmrest (two_.get_outlet ());
+      kill_mmrest (shared_.get_outlet ());
 
       if (playing_state_ != UNISONO
          && newstate == UNISONO)
@@ -241,13 +240,13 @@ New_pc_iterator::solo2 ()
     {
       state_ = SOLO2;
       
-      second_iter_->substitute_outlet (null_.report_to (), shared_.report_to ());
-      second_iter_->substitute_outlet (two_.report_to (), shared_.report_to ());
+      second_iter_->substitute_outlet (null_.get_outlet (), shared_.get_outlet ());
+      second_iter_->substitute_outlet (two_.get_outlet (), shared_.get_outlet ());
 
-      first_iter_->substitute_outlet (one_.report_to (), null_.report_to ());
-      first_iter_->substitute_outlet (shared_.report_to (), null_.report_to ());
-      kill_mmrest (one_.report_to ());
-      kill_mmrest (shared_.report_to ());
+      first_iter_->substitute_outlet (one_.get_outlet (), null_.get_outlet ());
+      first_iter_->substitute_outlet (shared_.get_outlet (), null_.get_outlet ());
+      kill_mmrest (one_.get_outlet ());
+      kill_mmrest (shared_.get_outlet ());
       
       if (playing_state_ != SOLO2)
        {
@@ -273,11 +272,11 @@ New_pc_iterator::apart (bool silent)
     {
       state_ = APART;
   
-      first_iter_->substitute_outlet (null_.report_to (), one_.report_to ());
-      first_iter_->substitute_outlet (shared_.report_to (), one_.report_to ());
+      first_iter_->substitute_outlet (null_.get_outlet (), one_.get_outlet ());
+      first_iter_->substitute_outlet (shared_.get_outlet (), one_.get_outlet ());
   
-      second_iter_->substitute_outlet (null_.report_to (), two_.report_to ());
-      second_iter_->substitute_outlet (shared_.report_to (), two_.report_to ());    }
+      second_iter_->substitute_outlet (null_.get_outlet (), two_.get_outlet ());
+      second_iter_->substitute_outlet (shared_.get_outlet (), two_.get_outlet ());    }
 }
 
 void
@@ -292,13 +291,13 @@ New_pc_iterator::construct_children ()
                          SCM_UNDEFINED);
 
   Translator_group *tr
-    =  report_to ()->find_create_translator (ly_symbol2scm ("Voice"),
+    =  get_outlet ()->find_create_translator (ly_symbol2scm ("Voice"),
                                             "shared",props);
 
   shared_ .set_translator (tr); 
   set_translator (tr);
   Translator_group *null
-    =  report_to ()->find_create_translator (ly_symbol2scm ("Devnull"),
+    =  get_outlet ()->find_create_translator (ly_symbol2scm ("Devnull"),
                                             "", SCM_EOL);
 
   if (!null)
@@ -351,7 +350,7 @@ New_pc_iterator::construct_children ()
 void
 New_pc_iterator::process (Moment m)
 {
-  Moment now = report_to ()->now_mom ();
+  Moment now = get_outlet ()->now_mom ();
   Moment *splitm = 0;
   
   for (; gh_pair_p (split_list_); split_list_ = gh_cdr (split_list_))
@@ -401,16 +400,4 @@ New_pc_iterator::try_music_in_children (Music *m) const
     return second_iter_->try_music (m);
 }
 
-
-SCM
-New_pc_iterator::get_pending_events (Moment m)const
-{
-  SCM s = SCM_EOL;
-  if (first_iter_)
-    s = gh_append2 (s,first_iter_->get_pending_events (m));
-  if (second_iter_)
-    s = gh_append2 (second_iter_->get_pending_events (m),s);
-  return s;
-}
-
 IMPLEMENT_CTOR_CALLBACK (New_pc_iterator);
index e1cd1618a6d804b48ff89031560d8d5ab4590427..e8744e16b8b8ae681df38e042a7f5f3701d32203 100644 (file)
@@ -27,8 +27,6 @@ Output_property_music_iterator::process (Moment m)
        get_music ()->origin ()->warning (_f ("Junking event: `%s'",
                                          classname (get_music ())));
     }
-
-  skip (m);
 }
 
 IMPLEMENT_CTOR_CALLBACK (Output_property_music_iterator);
index 2329daff5a3dbacad95bb1ab9327a6cbc4b3511a..5f25bcf6c5ccdab309fa79411b2c8f8fbd019ab0 100644 (file)
@@ -60,7 +60,7 @@ Percent_repeat_iterator::process (Moment m)
     {
       Music_iterator *yeah = try_music (get_music ());
       if (yeah)
-       set_translator (yeah->report_to ());
+       set_translator (yeah->get_outlet ());
       else
        get_music ()->origin ()->warning ( _ ("no one to print a percent"));
     }
index c054aa28ba5addfabb133f596599a34c142bc175..11d0f3212ea509d923e59107fdd0ad88d9477cd5 100644 (file)
@@ -30,7 +30,7 @@ Property_iterator::process (Moment m)
       if (val != SCM_EOL)
        ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?"));
       if (ok)
-       report_to ()->internal_set_property (sym, val);
+       get_outlet ()->internal_set_property (sym, val);
     }
   Simple_music_iterator::process (m);
 }
@@ -40,7 +40,7 @@ Property_unset_iterator::process (Moment m)
 {
   SCM sym = get_music ()->get_mus_property ("symbol");
   type_check_assignment (sym, SCM_EOL, ly_symbol2scm ("translation-type?"));  
-  report_to ()->unset_property (sym);
+  get_outlet ()->unset_property (sym);
 
   Simple_music_iterator::process (m);
 }
@@ -63,10 +63,10 @@ Property_iterator::do_quit ()
 {
   if (to_boolean (get_music ()->get_mus_property  ("once")))
     {
-      SCM trans = report_to()->self_scm();
+      SCM trans = get_outlet ()->self_scm();
       SCM music = get_music()->self_scm();
 
-      Global_translator * tg=  report_to()->top_translator ();
+      Global_translator * tg=  get_outlet ()->top_translator ();
 
       tg->add_finalization (scm_list_n (once_finalization_proc,
                                        trans, music, SCM_UNDEFINED));
@@ -111,9 +111,9 @@ Push_property_iterator::process (Moment m)
       if (to_boolean (get_music ()->get_mus_property ("pop-first"))
          && !to_boolean (get_music ()->get_mus_property ("once"))
          )
-       report_to()->execute_pushpop_property (sym, eprop, SCM_UNDEFINED);
+       get_outlet ()->execute_pushpop_property (sym, eprop, SCM_UNDEFINED);
 
-      report_to()->execute_pushpop_property (sym, eprop, val);
+      get_outlet ()->execute_pushpop_property (sym, eprop, val);
     }
   Simple_music_iterator::process (m);
 }
@@ -140,10 +140,10 @@ Push_property_iterator::do_quit ()
 {
   if (to_boolean (get_music ()->get_mus_property  ("once")))
     {
-      SCM trans = report_to()->self_scm();
+      SCM trans = get_outlet ()->self_scm();
       SCM music = get_music ()->self_scm();
 
-      Global_translator * tg=  report_to()->top_translator ();
+      Global_translator * tg=  get_outlet ()->top_translator ();
       tg->add_finalization (scm_list_n (once_finalization_proc,
                                        trans, music, SCM_UNDEFINED));
     }
@@ -157,7 +157,7 @@ Pop_property_iterator::process (Moment m)
   if (check_grob (get_music (), sym))
     {
       SCM eprop = get_music ()->get_mus_property ("grob-property");
-      report_to()->execute_pushpop_property (sym, eprop, SCM_UNDEFINED);
+      get_outlet ()->execute_pushpop_property (sym, eprop, SCM_UNDEFINED);
     }  
   Simple_music_iterator::process (m);
 }
index d60ca429f83461aeb4181cbf3cfcdcedca0ca916..2b41b1e016540f37e22cf11fc948449c060dae6c 100644 (file)
@@ -229,8 +229,8 @@ Sequential_iterator::next_element (bool)
 void
 Sequential_iterator::descend_to_child ()
 {
-  Translator_group  * child_report = child_report = iter_->report_to ();
-  Translator_group * me_report = report_to ();
+  Translator_group  * child_report = child_report = iter_->get_outlet ();
+  Translator_group * me_report = get_outlet ();
 
   Translator_group * c = child_report;
   while (c && c != me_report)
@@ -243,82 +243,6 @@ Sequential_iterator::descend_to_child ()
 }
 
 
-/*
-  Retrieve all music (starting at HERE), until a music with length L >
-  0 is found.  From the precondition, we know that UNTIL is later than
-  the earliest event. Hence we know
-  
-  L >= (UNTIL - HERE)
-
-  so something that comes after this thing with L > 0 happens after
-
-  HERE + L >= HERE + (UNTIL - HERE) = UNTIL
-
-  Hence all events after the one with L>0 are uninteresting, so we
-  ignore them.
-  
-*/
-
-SCM
-Sequential_iterator::get_pending_events (Moment until) const
-{
-  SCM s = SCM_EOL;
-  if (until <  pending_moment ())
-    return s;
-
-  Sequential_iterator * me =
-    dynamic_cast<Sequential_iterator*> (clone ());
-  while (me->ok ())
-    {
-      SCM nm = me->iter_->get_pending_events (until - me->here_mom_);
-      s = gh_append2 (nm, s);
-      
-      Moment m = 0;
-      for (SCM i = nm; gh_pair_p (i); i = ly_cdr (i))
-       {
-         Music *mus=unsmob_music (ly_car (i));
-         m = m >? (mus->get_length () - mus->start_mom ());
-       }
-      if (m > Moment (0))
-       break ;
-      else
-       me->next_element (false);
-    }
-
-  scm_gc_unprotect_object (me->self_scm());
-  return s;
-}
-
-
-/*
-  Skip events till UNTIL. We don't do any other side effects such as
-  descending to child iterator contexts, because they might depend on
-  \context specs and \translator changes being executed
- */
-void
-Sequential_iterator::skip (Moment until)
-{
-  while (ok ())
-    {
-      if (grace_fixups_ &&
-         grace_fixups_->start_ == here_mom_
-         && (grace_fixups_->start_ + grace_fixups_->length_
-             + Moment (Rational (0), grace_fixups_->grace_start_) == until))
-       {
-         /*
-           do the stuff/note/rest preceding a grace.
-          */
-         iter_->skip (iter_->music_get_length ());
-       }
-      else if (iter_->music_get_length () >= until - here_mom_)
-       iter_->skip (until - here_mom_ + iter_->music_start_mom ());
-
-      if (iter_->ok ())
-       return ; 
-
-      next_element (false);
-    }
-}
 
 void
 Sequential_iterator::process (Moment until)
index 75939374903ba5c175217bd2c4785e06cb41df08..5ea6270a5a75b8b5d040dd7ce7fb9bca9c6b9310 100644 (file)
@@ -46,28 +46,14 @@ Simple_music_iterator::pending_moment ()const
     return music_get_length ();
 }
 
-void
-Simple_music_iterator::skip (Moment m)
-{
-  /*
-    docme??!!
-
-    uncommented because setting MUSIC_L_ = 0 causes core dumps with
-    grace notes.  */
-  
-  //  music_ = 0;
-  
-  last_processed_mom_ = m;
-}
 
 void
-Simple_music_iterator::process (Moment m)
+Simple_music_iterator::process (Moment )
 {
   /*
   don't do try_music (), since it would make the function useless for
   base classes */
 
-  skip (m);
 }
 
 IMPLEMENT_CTOR_CALLBACK (Simple_music_iterator);
index ad0796250a4ed6ac12dbbee63f92956f61abf357..347837275b75300b1d194c7d4ff642de418fbce3 100644 (file)
@@ -54,17 +54,6 @@ Simultaneous_music_iterator::derived_substitute(Translator_group*f,Translator_gr
     unsmob_iterator (gh_car (s))-> substitute_outlet (f,t);
 }
 
-SCM
-Simultaneous_music_iterator::get_pending_events (Moment m)const
-{
-  SCM l = SCM_EOL;
-  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr(s))
-    {
-      l = gh_append2 (unsmob_iterator (gh_car (s))->get_pending_events (m), l);
-    }
-  return l;
-}
-
 void
 Simultaneous_music_iterator::construct_children ()
 {
@@ -84,13 +73,13 @@ Simultaneous_music_iterator::construct_children ()
       /* if separate_contexts_b_ is set, create a new context with the
         number number as name */
 
-      SCM name = unsmob_context_def (report_to ()->definition_)->get_context_name ();
+      SCM name = unsmob_context_def (get_outlet ()->definition_)->get_context_name ();
       Translator_group * t = (j && separate_contexts_b_)
-       ? report_to ()->find_create_translator (name, to_string (j), SCM_EOL)
-       : report_to ();
+       ? get_outlet ()->find_create_translator (name, to_string (j), SCM_EOL)
+       : get_outlet ();
 
       if (!t)
-       t = report_to ();
+       t = get_outlet ();
 
       mi->init_translator (mus, t);
       mi->construct_children ();
@@ -129,29 +118,6 @@ Simultaneous_music_iterator::process (Moment until)
     }
 }
 
-void
-Simultaneous_music_iterator::skip (Moment until)
-{
-  SCM *proc = &children_list_; 
-  while(gh_pair_p (*proc))
-    {
-      Music_iterator * i = unsmob_iterator (gh_car (*proc));
-      if (i->pending_moment () <= until) 
-       {
-         i->skip (until);
-       }
-      if (!i->ok ())
-       {
-         i->quit ();
-         *proc = gh_cdr (*proc);
-       }
-      else
-       {
-         proc = SCM_CDRLOC(*proc);
-       }
-    }
-}
-
 Moment
 Simultaneous_music_iterator::pending_moment () const
 {
index ede99b4931ca90dc8b67ae9444120605a0255fcb..89cdd483b9d1cae69ced36820433a1d2607c356c 100644 (file)
@@ -20,7 +20,7 @@ Time_scaled_music_iterator::process (Moment m)
     {
       Music_iterator *yeah = try_music (get_music ());
       if (yeah)
-       set_translator (yeah->report_to ());
+       set_translator (yeah->get_outlet ());
       else
        get_music ()->origin ()->warning (_ ("no one to print a tuplet start bracket"));
     }
index 27141d0e27f5a4b56cdca686eb76919a9924c10a..fac94cece6b0a8594a4b2414165111ab9dcdbcfb 100644 (file)
@@ -107,9 +107,9 @@ void
 Volta_repeat_iterator::add_repeat_command (SCM what)
 {
   SCM reps = ly_symbol2scm ("repeatCommands");
-  SCM current_reps = report_to ()->internal_get_property (reps);
+  SCM current_reps = get_outlet ()->internal_get_property (reps);
 
-  Translator_group * where = report_to ()->where_defined (reps);
+  Translator_group * where = get_outlet ()->where_defined (reps);
   if (where
       && current_reps == SCM_EOL || gh_pair_p (current_reps))
     {