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
@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:
@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
-\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
\context Staff=down<<
\global
\clef bass
- \autochange Staff \context Voice \accompany
+ \autochange \context Voice \accompany
>>
>>
-\version "2.1.7"
+\version "2.1.18"
\header { texidoc="@cindex Slur Ugly
You can get ugly slurs, if you want. "
\context Staff=up { s1 * 6/4 }
\context Staff=down <<
\clef bass
- \autochange Staff \context Voice \baseWalk
+ \autochange \context Voice \baseWalk
>>
>>
\paper {
{
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);
}
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;
/*
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);
}
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_))
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");
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);
}
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");
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);
}
{
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"));
}
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);
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
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))
{
mus->origin ()->warning (_f ("Junking event: `%s'", mus->name()));
}
}
- skip (m);
}
IMPLEMENT_CTOR_CALLBACK (Event_chord_iterator);
*/
-/*
- 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"
*/
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 ();
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 ();
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*);
};
* 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:
/**
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*);
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 ();
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);
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);
virtual void process (Moment);
virtual bool ok ()const;
virtual Moment pending_moment ()const;
-
- virtual void skip (Moment);
};
#endif /* SIMPLE_MUSIC_ITERATOR_HH */
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:
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;
}
/*
Don't do
- if (report_to_)
+ if (outlet_)
down ();
with GC, this is asynchronous.
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_ ;
}
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();
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.
*/
}
Translator_group*
-Music_iterator::report_to () const
+Music_iterator::get_outlet () const
{
- return handle_.report_to ();
+ return handle_.get_outlet ();
}
void
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)
{
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);
}
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;
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);
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());
{
return child_iter_ && child_iter_->ok ();
}
-void
-Music_wrapper_iterator::skip (Moment m)
-{
- child_iter_->skip (m);
-}
+
void
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
find_thread ();
if (lyric_iter_)
- lyrics_context_ = find_context_below (lyric_iter_->report_to (),
+ lyrics_context_ = find_context_below (lyric_iter_->get_outlet (),
"LyricsVoice", "");
/*
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_;
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;
{
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 ());
}
}
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)
{
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)
{
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)
{
{
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
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)
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_))
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);
get_music ()->origin ()->warning (_f ("Junking event: `%s'",
classname (get_music ())));
}
-
- skip (m);
}
IMPLEMENT_CTOR_CALLBACK (Output_property_music_iterator);
{
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"));
}
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);
}
{
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);
}
{
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));
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);
}
{
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));
}
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);
}
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)
}
-/*
- 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)
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);
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 ()
{
/* 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 ();
}
}
-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
{
{
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"));
}
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))
{