MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=86
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
--- /dev/null
+\score{
+ \context Staff <
+ \context Voice=one\skip 1;
+ \context Voice=two\skip 1;
+ \context Voice=one \partcombine Voice
+ \context Thread=one \notes\relative c'' {
+ c4( c b )a
+ a( b c )d
+ }
+ \context Thread=two \notes\relative c'' {
+ a4( c b )a
+ a( b c )a
+
+ }
+ >
+ \paper{
+ linewidth=140.\mm;
+ }
+}
+
+
-\score{
- \context Staff <
- \context Voice=one\skip 1;
- \context Voice=two\skip 1;
- \context Voice=one \partcombine Voice
- \context Thread=one \notes\relative c'' {
- c2 c2
- c2 c2
- }
- \context Thread=two \notes\relative c'' {
- b2 a4 () a
- a2 a4 () a
-
- }
- >
- \paper{
- linewidth=140.\mm;
- }
-}
-
-
--- /dev/null
+\score{
+ \context Staff <
+ \context Voice=one\skip 1;
+ \context Voice=two\skip 1;
+ \context Voice=one \partcombine Voice
+ \context Thread=one \notes\relative c'' {
+ c2 c2
+ c2 c2
+ }
+ \context Thread=two \notes\relative c'' {
+ b2 a4 () a
+ a2 a4 () a
+
+ }
+ >
+ \paper{
+ linewidth=140.\mm;
+ }
+}
+
+
-\score {
- \context Voice \notes\relative c {
- % Test of prima/secunda volta brackets in conjunction with
- % line breaks and special bars.
-
- c' d e f |
- \repeat "volta" 2 { g a b c }
- \alternative { { c b a g a g a g} { f e d c } }
- \repeat "volta" 2 { g a b c }
- \alternative { { c b a g \break a g a g} { f e d c } }
- c' d e f |
- \repeat "volta" 2 { g a b c }
- \alternative { { c b a g \break a g a g \break a b a b } { f e d c } }
- c' d e f |
- \repeat "volta" 2 { g a b c }
- \alternative { { c b a g } { f e d c \break a g a g} }
- c' d e f |
- \repeat "volta" 2 { g a b c }
- \alternative { { c b a g a g a g} { f e d c \bar "|.";} }
-
- }
- \paper { }
- \midi { }
-}
\ No newline at end of file
+
+voice4 = \notes {
+\clef bass;
+ \property Staff.instrument = "Bass"
+ \property Staff.instr = "B"
+ \time 4/4; f,2 ( ) f,8 r8 f8 e8
+\repeat volta 2
+{
+ d8. d16 e8. f16 f8 c8 c16 c8.
+}
+\alternative
+{
+ { f,2 ( ) f,8 r8 f8 e8 ( \break }
+ { ) f,2. r8 c16 c16 |
+ }
+}
+}
+voicedefault = \notes {
+ \property Staff.timeSignatureStyle="C"
+ \time 4/4; \key f;
+ \tempo 4 = 200;
+}
+\score{
+ \notes <
+
+
+ \context Staff="4"
+ {
+ \$voicedefault
+ \$voice4
+ }
+
+ >
+ \paper {
+ font_normal = 12.;
+ \translator {
+ \StaffContext
+ \consists Instrument_name_engraver;
+ }
+ }
+}
+
bool
A2_devnull_engraver::do_try_music (Music *m)
{
+ return false;
if (1 //daddy_trans_l_->id_str_ == "two"
&& (to_boolean (get_property ("unison"))
|| to_boolean (get_property ("unisilence"))))
; // error (_ ("none of these in my family"));
}
+
Pitch_interrogate_req* spanish_inquisition; // nobody expects it
+
void
-Auto_change_iterator::do_process_and_next (Moment m)
+Auto_change_iterator::do_process (Moment m)
{
- Music_wrapper_iterator::do_process_and_next (m);
+ Music_wrapper_iterator::do_process (m);
if (!spanish_inquisition)
spanish_inquisition = new Pitch_interrogate_req;
/*
GUHG!
*/
- String warn2= "Change_iterator::do_process_and_next (): "
+ String warn2= "Change_iterator::do_process (): "
+ report_to_l ()->type_str_ + " = `"
+ report_to_l ()->id_str_ + "': ";
warning (warn2);
move to construct_children ?
*/
void
-Change_iterator::do_process_and_next (Moment m)
+Change_iterator::do_process (Moment m)
{
Translator_group * current = report_to_l ();
Translator_group * last = 0;
}
else
error (_ ("none of these in my family"));
- Music_iterator::do_process_and_next (m);
+ Music_iterator::do_process (m);
}
}
void
-Chord_tremolo_iterator::do_process_and_next (Moment m)
+Chord_tremolo_iterator::do_process (Moment m)
{
if (!m)
{
music_l_->origin ()->warning ( _("no one to print a tremolos"));
}
- child_iter_p_->process_and_next (factor_ * m);
+ child_iter_p_->process (factor_ * m);
}
}
void
-Folded_repeat_iterator::do_process_and_next (Moment m)
+Folded_repeat_iterator::do_process (Moment m)
{
if (!m)
{
if (main_iter_p_)
{
- main_iter_p_->process_and_next (m);
+ main_iter_p_->process (m);
if (!main_iter_p_->ok ())
leave_body ();
}
if (alternative_iter_p_)
{
- alternative_iter_p_->process_and_next (m - main_length_mom_);
+ alternative_iter_p_->process (m - main_length_mom_);
if (!alternative_iter_p_->ok ())
{
delete alternative_iter_p_;
(c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "global-translator.hh"
-#include "music-iterator.hh"
#include "debug.hh"
+#include "music.hh"
+#include "music-iterator.hh"
+#include "global-translator.hh"
-Global_translator::Global_translator()
+Global_translator::Global_translator ()
{
}
extra_mom_pq_.insert (m);
}
-void
-Global_translator::modify_next (Moment &w)
+Moment
+Global_translator::sneaky_insert_extra_moment (Moment w)
{
- while (extra_mom_pq_.size() &&
- extra_mom_pq_.front() <= w)
-
- w =extra_mom_pq_.get();
+ while (extra_mom_pq_.size() && extra_mom_pq_.front() <= w)
+ w = extra_mom_pq_.get();
+ return w;
}
int
iter->print();
}
- modify_next (w);
+ w = sneaky_insert_extra_moment (w);
prepare (w);
if (flower_dstream && !flower_dstream->silent_b ("walking"))
print();
- iter->process_and_next (w);
+ iter->process (w);
+ for (SCM i = iter->get_music (); gh_pair_p (i); i = SCM_CDR (i))
+ {
+ assert (gh_pair_p (i));
+ SCM p = SCM_CAR (i);
+ Music *m = unsmob_music (SCM_CAR (p));
+ Translator *t = unsmob_translator (SCM_CDR (p));
+ assert (m);
+ assert (t);
+ bool b = t->try_music (m);
+ if (!b)
+ {
+ /*
+ Children?
+ */
+ printf ("junking:\n");
+ m->print ();
+ t->print ();
+ }
+
+ }
+
+ iter->next ();
process();
}
}
}
void
-Grace_iterator::do_process_and_next (Moment m)
+Grace_iterator::do_process (Moment m)
{
Global_translator * t = dynamic_cast<Global_translator*>(report_to_l ());
if (t)
{
warning (_("no Grace context available"));
}
- Music_iterator::do_process_and_next (m);
+ Music_iterator::do_process (m);
}
Moment
Auto_change_iterator ();
protected:
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
private:
Direction where_dir_;
{
public:
VIRTUAL_COPY_CONS (Music_iterator);
- /*
- CTOR is public
- */
-
-protected:
- virtual void do_process_and_next (Moment);
+ /* constructor is public */
+ virtual void do_process (Moment);
private:
void error (String);
virtual void construct_children () ;
virtual bool ok () const;
virtual void do_print () const;
- virtual void do_process_and_next (Moment) ;
+ virtual void do_process (Moment) ;
virtual Music_iterator *try_music_in_children (Music *) const;
private:
void enter_alternative ();
void leave_body ();
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
virtual Music_iterator *try_music_in_children (Music *) const;
private:
Global_translator();
int moments_left_i() const;
- void modify_next (Moment&);
+ Moment sneaky_insert_extra_moment (Moment);
void add_moment_to_process (Moment);
void run_iterator_on_me (Music_iterator*);
VIRTUAL_COPY_CONS (Music_iterator);
~Grace_iterator ();
virtual void construct_children () ;
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
Moment next_moment () const;
};
protected:
virtual void construct_children ();
virtual Moment next_moment () const;
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
virtual Music_iterator *try_music_in_children (Music *) const;
virtual bool ok () const;
/**
The translation unit that we this iterator is reporting to now.
*/
- Translator_group*report_to_l () const;
+ Translator_group* report_to_l () const;
void set_translator (Translator_group*);
///Are we finished with this piece of music?
virtual bool ok () const;
- virtual Music* get_music ();
+ virtual SCM get_music ();
virtual bool next ();
- ///Report all musical information that occurs between now and UNTIL
- void process_and_next (Moment until);
+ void process (Moment until);
/**
Construct sub-iterators, and set the translator to
*/
Music_iterator* get_iterator_p (Music *) const;
- /** Do the actual move. This should be overriden in derived
- classes. It is called by #process_and_next#, the public interface
- */
- virtual void do_process_and_next (Moment until);
+ virtual void do_process (Moment);
virtual Music_iterator* try_music_in_children (Music *) const;
virtual void construct_children () ;
virtual Moment next_moment () const;
virtual bool ok () const;
- virtual Music* get_music ();
+ virtual SCM get_music ();
virtual bool next ();
protected:
virtual void do_print () const;
- virtual void do_process_and_next (Moment) ;
+ virtual void do_process (Moment);
virtual Music_iterator *try_music_in_children (Music *) const;
Music_iterator *child_iter_p_;
Part_combine_music_iterator ();
protected:
+ virtual ~Part_combine_music_iterator ();
+
virtual void construct_children ();
virtual Moment next_moment () const;
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
virtual Music_iterator *try_music_in_children (Music *) const;
virtual bool ok () const;
+ virtual bool next ();
+ virtual SCM get_music ();
virtual void do_print () const;
- virtual ~Part_combine_music_iterator ();
private:
void change_to (Music_iterator*, String, String);
{
public:
VIRTUAL_COPY_CONS (Music_iterator);
- // construction
+ /* construction */
protected:
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
};
class Push_property_iterator : public Music_iterator
public:
VIRTUAL_COPY_CONS (Music_iterator);
protected:
- virtual void do_process_and_next (Moment);
+ /* construction */
+ virtual void do_process (Moment);
};
class Pop_property_iterator : public Music_iterator
public:
VIRTUAL_COPY_CONS (Music_iterator);
protected:
- virtual void do_process_and_next (Moment);
+ /* construction */
+ virtual void do_process (Moment);
};
virtual bool ok () const;
protected:
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
virtual Moment next_moment() const;
virtual void construct_children();
virtual void do_print() const;
virtual void construct_children ();
virtual Moment next_moment () const;
virtual bool ok () const;
- virtual Music* get_music ();
+ virtual SCM get_music ();
virtual bool next ();
protected:
virtual void do_print() const;
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
virtual Music_iterator *try_music_in_children (Music *) const;
-
private:
Moment here_mom_;
VIRTUAL_COPY_CONS (Music_iterator);
Simple_music_iterator ();
Simple_music_iterator (Simple_music_iterator const &);
-
-protected:
- virtual void do_process_and_next (Moment );
+ virtual void do_process (Moment);
};
#endif /* SIMPLE_MUSIC_ITERATOR_HH */
virtual Moment next_moment () const;
virtual bool ok () const;
virtual bool next ();
- virtual Music* get_music ();
+ virtual SCM get_music ();
protected:
virtual void do_print () const;
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
virtual Music_iterator *try_music_in_children (Music *) const;
-
private:
Cons_list<Music_iterator> children_p_list_;
};
{
public:
VIRTUAL_COPY_CONS (Music_iterator);
- // construction
+ /* construction */
protected:
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
};
protected:
virtual void construct_children ();
virtual Moment next_moment () const;
- virtual void do_process_and_next (Moment);
+ virtual void do_process (Moment);
virtual Music_iterator *try_music_in_children (Music *) const;
virtual bool ok () const;
}
void
-Lyric_combine_music_iterator::do_process_and_next (Moment m)
+Lyric_combine_music_iterator::do_process (Moment m)
{
Moment my_next = music_iter_p_->next_moment ();
if (my_next > m)
return;
- music_iter_p_->process_and_next (m);
+ music_iter_p_->process (m);
bool busy = try_music (busy_req);
if (busy)
#endif
Moment m= lyric_iter_p_->next_moment ();
- lyric_iter_p_->process_and_next (m);
+ lyric_iter_p_->process (m);
}
}
}
- Music_iterator::do_process_and_next (m);
+ Music_iterator::do_process (m);
}
Lyric_combine_music_iterator::~Lyric_combine_music_iterator ()
music_l_ = src.music_l_;
}
-Music_iterator::~Music_iterator()
+Music_iterator::~Music_iterator ()
{
}
void
-Music_iterator::do_print() const
+Music_iterator::do_print () const
{
}
void
-Music_iterator::print() const
+Music_iterator::print () const
{
#ifndef NPRINT
if (!flower_dstream)
return ;
- DEBUG_OUT << classname(this) << "{";
- Translator_group *t = report_to_l();
+ DEBUG_OUT << classname (this) << "{";
+ Translator_group *t = report_to_l ();
DEBUG_OUT << "report to " << t->type_str_ << " = " << t->id_str_ << "\n";
- if (ok())
- DEBUG_OUT << "next at " << next_moment() << " ";
+ if (ok ())
+ DEBUG_OUT << "next at " << next_moment () << " ";
else
DEBUG_OUT << "not feeling well today..";
- do_print();
+ do_print ();
DEBUG_OUT << "}\n";
#endif
}
Translator_group*
-Music_iterator::get_req_translator_l()
+Music_iterator::get_req_translator_l ()
{
- assert (report_to_l());
- if (report_to_l()->is_bottom_translator_b ())
- return report_to_l();
+ assert (report_to_l ());
+ if (report_to_l ()->is_bottom_translator_b ())
+ return report_to_l ();
- set_translator (report_to_l()->get_default_interpreter ());
- return report_to_l();
+ set_translator (report_to_l ()->get_default_interpreter ());
+ return report_to_l ();
}
Translator_group*
-Music_iterator::report_to_l() const
+Music_iterator::report_to_l () const
{
return handle_.report_to_l ();
}
void
-Music_iterator::set_translator (Translator_group*trans)
+Music_iterator::set_translator (Translator_group *trans)
{
handle_.set_translator (trans);
}
void
-Music_iterator::construct_children()
+Music_iterator::construct_children ()
{
}
Moment
-Music_iterator::next_moment() const
+Music_iterator::next_moment () const
{
return 0;
}
-
void
-Music_iterator::process_and_next (Moment m)
+Music_iterator::process (Moment m)
{
- do_process_and_next (m);
+ do_process (m);
}
void
-Music_iterator::do_process_and_next (Moment)
+Music_iterator::do_process (Moment)
{
first_b_ = false;
}
return first_b_;
}
-Music*
+SCM
Music_iterator::get_music ()
{
if (ok ())
- return music_l_;
- return 0;
+ return scm_listify (scm_cons (music_l_->self_scm (),
+ report_to_l ()->self_scm ()),
+ SCM_UNDEFINED);
+ return SCM_EOL;
}
bool
}
Music_iterator*
-Music_iterator::static_get_iterator_p (Music *m)
+Music_iterator::static_get_iterator_p (Music *m)
{
Music_iterator * p =0;
p = new Property_iterator;
else if (dynamic_cast<Change_translator *> (m))
p = new Change_iterator;
- else if (dynamic_cast<Push_translation_property*>(m))
+ else if (dynamic_cast<Push_translation_property*> (m))
p = new Push_property_iterator;
- else if (dynamic_cast<Pop_translation_property*>(m))
+ else if (dynamic_cast<Pop_translation_property*> (m))
p = new Pop_property_iterator;
else if (dynamic_cast<Time_scaled_music *> (m))
p = new Time_scaled_music_iterator;
}
void
-Music_iterator::init_translator (Music *m, Translator_group *report_l)
+Music_iterator::init_translator (Music *m, Translator_group *report_l)
{
music_l_ = m;
- if (Context_specced_music * csm =dynamic_cast<Context_specced_music *>(m))
+ if (Context_specced_music * csm =dynamic_cast<Context_specced_music *> (m))
{
Translator_group* a =report_l->
find_create_translator_l (csm->translator_type_str_, csm->translator_id_str_);
}
- if (! report_to_l())
+ if (! report_to_l ())
set_translator (report_l);
}
Music_iterator::get_iterator_p (Music *m) const
{
Music_iterator*p = static_get_iterator_p (m);
- p->init_translator (m, report_to_l());
+ p->init_translator (m, report_to_l ());
- p->construct_children();
+ p->construct_children ();
return p;
}
Music_iterator*
-Music_iterator::try_music (Music *m) const
+Music_iterator::try_music (Music *m) const
{
- bool b = report_to_l ()->try_music ((Music*)m); // ugh
+ bool b = report_to_l ()->try_music ( (Music*)m); // ugh
Music_iterator * it = b ? (Music_iterator*) this : 0; // ugh
if (!it)
it = try_music_in_children (m);
}
Music_iterator*
-Music_iterator::try_music_in_children (Music * ) const
+Music_iterator::try_music_in_children (Music *) const
{
return 0;
}
}
void
-Music_wrapper_iterator::do_process_and_next (Moment m)
+Music_wrapper_iterator::do_process (Moment m)
{
- child_iter_p_->process_and_next (m);
- Music_iterator::do_process_and_next (m);
+ child_iter_p_->process (m);
+ Music_iterator::do_process (m);
}
-Music*
+SCM
Music_wrapper_iterator::get_music ()
{
return child_iter_p_->get_music ();
return first_iter_p_->ok () || second_iter_p_->ok ();
}
+SCM
+Part_combine_music_iterator::get_music ()
+{
+ return SCM_EOL;
+}
+
+bool
+Part_combine_music_iterator::next ()
+{
+ bool b = false;
+ if (first_iter_p_->ok ())
+ b = first_iter_p_->next ();
+ if (second_iter_p_->ok ())
+ b = second_iter_p_->next () || b;
+ return b;
+}
+
void
Part_combine_music_iterator::do_print () const
{
}
void
-Part_combine_music_iterator::do_process_and_next (Moment m)
+Part_combine_music_iterator::do_process (Moment m)
{
Part_combine_music const * p = dynamic_cast<Part_combine_music const* > (music_l_);
if (first_iter_p_->ok ())
{
Music_iterator* i = first_iter_p_->clone ();
- Moment until = i->next_moment ();
/* Urg, silly first_b_ stuff */
- if (now && i->next ())
- until = i->next_moment ();
+ if (now)
+ i->next ();
- /* How about a 'now_moment ()' for iterators? */
- for (; i->ok () && i->next_moment () == until; i->next ())
+ SCM s = i->get_music ();
+ if (gh_pair_p (s))
{
- if (Music_sequence* m = dynamic_cast<Music_sequence *> (i->get_music ()))
+ if (Music_sequence* m = dynamic_cast<Music_sequence *> (unsmob_music (SCM_CAR (SCM_CAR (s)))))
{
for (SCM s = m->music_list (); gh_pair_p (s); s = gh_cdr (s))
{
Music *u = unsmob_music (gh_car (s));
if (Melodic_req *r = dynamic_cast<Melodic_req *> (u))
- first_pitches.push (r->pitch_);
+ first_pitches.push (r->pitch_);
if (Rhythmic_req *r = dynamic_cast<Rhythmic_req *> (u))
first_durations.push (r->duration_);
}
}
}
}
-
+
Array<Musical_pitch> second_pitches;
Array<Duration> second_durations;
if (second_iter_p_->ok ())
{
Music_iterator* i = second_iter_p_->clone ();
- Moment until = i->next_moment ();
/* Urg, silly second_b_ stuff */
- if (now && i->next ())
- until = i->next_moment ();
+ if (now)
+ i->next ();
- /* How about a 'now_moment ()' for iterators? */
- for (; i->ok () && i->next_moment () == until; i->next ())
+ SCM s = i->get_music ();
+ if (gh_pair_p (s))
{
- if (Music_sequence* m = dynamic_cast<Music_sequence *> (i->get_music ()))
+ if (Music_sequence* m = dynamic_cast<Music_sequence *> (unsmob_music (SCM_CAR (SCM_CAR (s)))))
{
for (SCM s = m->music_list (); gh_pair_p (s); s = gh_cdr (s))
{
if (Melodic_req *r = dynamic_cast<Melodic_req *> (u))
second_pitches.push (r->pitch_);
if (Rhythmic_req *r = dynamic_cast<Rhythmic_req *> (u))
- second_durations.push (r->duration_);
+ second_durations.push (r->duration_);
}
}
}
second_until_ = new_until;
}
-#if 0 /* DEBUG */
+#if 1 /* DEBUG */
printf ("now: %s\n", now.str ().ch_C ());
printf ("first: ");
for (int i = 0; i < first_pitches.size (); i++)
Hmm, shouldn't we check per iterator if next_moment < m?
*/
if (first_iter_p_->ok ())
- first_iter_p_->process_and_next (m);
+ first_iter_p_->process (m);
if (second_iter_p_->ok ())
- second_iter_p_->process_and_next (m);
+ second_iter_p_->process (m);
- Music_iterator::do_process_and_next (m);
+ Music_iterator::do_process (m);
}
Music_iterator*
translation unit, and set the property.
*/
void
-Property_iterator::do_process_and_next (Moment m)
+Property_iterator::do_process (Moment m)
{
SCM sym = music_l_->get_mus_property ("symbol");
if (gh_symbol_p(sym))
report_to_l ()->set_property (sym, music_l_->get_mus_property ("value"));
- Music_iterator::do_process_and_next (m);
+ Music_iterator::do_process (m);
}
-
void
-Push_property_iterator::do_process_and_next (Moment m)
+Push_property_iterator::do_process (Moment m)
{
SCM syms = music_l_->get_mus_property ("symbols");
SCM eprop = music_l_->get_mus_property ("element-property");
Translator_def::apply_pushpop_property (report_to_l (), syms, eprop, val);
- Music_iterator::do_process_and_next (m);
+ Music_iterator::do_process (m);
}
void
-Pop_property_iterator::do_process_and_next (Moment m)
+Pop_property_iterator::do_process (Moment m)
{
SCM syms = music_l_->get_mus_property ("symbols");
SCM eprop = music_l_->get_mus_property ("element-property");
Translator_def::apply_pushpop_property (report_to_l (), syms, eprop, SCM_UNDEFINED);
- Music_iterator::do_process_and_next (m);
+ Music_iterator::do_process (m);
}
}
void
-Request_chord_iterator::do_process_and_next (Moment)
+Request_chord_iterator::do_process (Moment)
{
+#if 0
// URG
if (first_b_)
{
}
next ();
+#endif
}
set_translator (child_report);
}
-Music*
+SCM
Sequential_music_iterator::get_music ()
{
if (ok ())
- return unsmob_music (gh_car (cursor_));
+ return scm_listify (scm_cons (SCM_CAR (cursor_),
+ report_to_l ()->self_scm ()),
+ SCM_UNDEFINED);
- return 0;
+ return SCM_EOL;
}
bool
Sequential_music_iterator::next ()
{
+#if 0
if (ok ())
{
bool b = false;
return b;
}
return false;
+#else
+ if (ok ())
+ {
+ set_sequential_music_translator ();
+ leave_element ();
+ if (gh_pair_p (cursor_))
+ start_next_element ();
+ return ok ();
+ }
+ return false;
+#endif
}
/*
This should use get_music () and next ()
*/
void
-Sequential_music_iterator::do_process_and_next (Moment until)
+Sequential_music_iterator::do_process (Moment until)
{
+ return;
+#if 0
if (ok ())
{
while (1)
{
Moment here = iter_p_->next_moment ();
if (here != local_until)
- return Music_iterator::do_process_and_next (until);
+ return Music_iterator::do_process (until);
- iter_p_->process_and_next (local_until);
+ iter_p_->process (local_until);
}
if (!iter_p_->ok ())
if (gh_pair_p (cursor_))
start_next_element ();
else
- return Music_iterator::do_process_and_next (until);
+ return Music_iterator::do_process (until);
}
}
}
+#endif
}
Moment
}
void
-Simple_music_iterator::do_process_and_next (Moment m)
+Simple_music_iterator::do_process (Moment m)
{
+#if 0
if (ok ())
{
bool b = try_music (get_music ());
classname (music_l_)));
}
- Music_iterator::do_process_and_next (m);
+ Music_iterator::do_process (m);
+#endif
}
bool
Simultaneous_music_iterator::next ()
{
- if (cursor_i_ < children_p_list_.size_i ())
- cursor_i_++;
- return cursor_i_ < children_p_list_.size_i ();
+ for (Cons<Music_iterator> **pp = &children_p_list_.head_; *pp;)
+ {
+ Music_iterator *i = (*pp)->car_;
+ if (i->ok ())
+ i->next ();
+ if (!i->ok ())
+ delete children_p_list_.remove_cons (pp);
+ else
+ pp = &(*pp)->next_;
+ }
+ return ok ();
}
-Music*
+SCM
Simultaneous_music_iterator::get_music ()
{
- if (cursor_i_ < children_p_list_.size_i ())
+ SCM s = SCM_EOL;
+ // SCM t = report_to_l ()-self_scm ();
+ for (Cons<Music_iterator> *p = children_p_list_.head_; p; p = p->next_)
{
- Cons<Music_iterator> *p = children_p_list_.head_;
- for (int i = 0; i <= cursor_i_ && p; i++)
- p = p->next_;
- if (p)
- return p->car_->get_music ();
+ scm_cons (p->car_->get_music (), s);
}
- return 0;
+ return s;
}
void
}
void
-Simultaneous_music_iterator::do_process_and_next (Moment until)
+Simultaneous_music_iterator::do_process (Moment until)
{
- for (Cons<Music_iterator> **pp = &children_p_list_.head_; *pp; )
+#if 1
+ for (Cons<Music_iterator> **pp = &children_p_list_.head_; *pp;)
{
Music_iterator * i = (*pp)->car_;
if (i->next_moment() == until)
{
- i->process_and_next (until);
+ i->process (until);
}
if (!i->ok())
delete children_p_list_.remove_cons (pp);
else
pp = &(*pp)->next_;
}
- Music_iterator::do_process_and_next (until);
+ Music_iterator::do_process (until);
+#endif
}
-
-
-
Moment
Simultaneous_music_iterator::next_moment() const
{
#include "command-request.hh"
void
-Time_scaled_music_iterator::do_process_and_next (Moment m)
+Time_scaled_music_iterator::do_process (Moment m)
{
if (!m)
{
music_l_->origin ()->warning ( _("no one to print a tuplet start bracket"));
}
- Music_wrapper_iterator::do_process_and_next (m);
+ Music_wrapper_iterator::do_process (m);
}
}
void
-Unfolded_repeat_iterator::do_process_and_next (Moment m)
+Unfolded_repeat_iterator::do_process (Moment m)
{
if (!m)
{
}
if (m - done_mom_ >= current_iter_p_->next_moment ())
- current_iter_p_->process_and_next (m - done_mom_);
+ current_iter_p_->process (m - done_mom_);
else
return;
}
ADD_THIS_TRANSLATOR (Voice_devnull_engraver);
static char const *junk_interfaces[] = {
- // "beam-interface",
+#if 0
+ "beam-interface",
+#endif
"slur-interface",
"tie-interface",
"text-item-interface",