*/
class Tie_engraver : public Engraver
{
+ bool done_;
PQueue<CHead_melodic_tuple> past_notes_pq_;
Moment end_mom_;
Moment next_end_mom_;
virtual void do_pre_move_processing ();
virtual void acknowledge_element (Score_element_info);
virtual bool do_try_music (Music*);
- virtual void do_process_music ();
virtual void process_acknowledged ();
void typeset_tie (Score_element*);
public:
}
void
-Tie_engraver::do_process_music ()
+Tie_engraver::process_acknowledged ()
{
- if (req_l_)
+ if (req_l_ && !done_)
{
Moment now = now_mom ();
stopped_heads_.clear ();
while (past_notes_pq_.size ()
&& past_notes_pq_.front ().end_ == now)
stopped_heads_.push (past_notes_pq_.get ());
+ done_ = true;
+ return;
}
-}
-void
-Tie_engraver::process_acknowledged ()
-{
if (req_l_)
{
now_heads_.sort (CHead_melodic_tuple::pitch_compare);
while (i >= 0 && j >=0)
{
int comp
- = Musical_pitch::compare (*unsmob_pitch (now_heads_[i].req_l_->get_mus_property ("pitch") ),
+ = Pitch::compare (*unsmob_pitch (now_heads_[i].req_l_->get_mus_property ("pitch") ),
*unsmob_pitch (stopped_heads_[j].req_l_->get_mus_property ("pitch")));
if (comp)
set_melisma (false);
}
req_l_ = 0;
+ done_ = false;
Moment now = now_mom ();
while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now)
past_notes_pq_.delmin ();
SCM p1 = h1.req_l_->get_mus_property ("pitch");
SCM p2 = h2.req_l_->get_mus_property ("pitch");
- return Musical_pitch::equal_p (p1,p2) == SCM_BOOL_T;
+ return Pitch::equal_p (p1,p2) == SCM_BOOL_T;
}
int