#include "musical-request.hh"
#include "tie.hh"
#include "translator-group.hh"
+#include "spanner.hh"
#include "tie-column.hh"
#include "pqueue.hh"
#include "engraver.hh"
Tie_req *req_l_;
Array<CHead_melodic_tuple> now_heads_;
Array<CHead_melodic_tuple> stopped_heads_;
- Link_array<Tie> tie_p_arr_;
+ Link_array<Score_element> tie_p_arr_;
Spanner * tie_column_p_;
while (i >= 0 && j >=0)
{
int comp
- = Musical_pitch::compare (now_heads_[i].req_l_->pitch_ ,
- stopped_heads_[j].req_l_->pitch_);
+ = Musical_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)
{
}
else
{
- head_list = gh_cons (gh_cons (stopped_heads_[j].head_l_->self_scm_,
- now_heads_[i].head_l_->self_scm_),
+ head_list = gh_cons (gh_cons (stopped_heads_[j].head_l_->self_scm (),
+ now_heads_[i].head_l_->self_scm ()),
head_list);
past_notes_pq_. insert (now_heads_[i]);
}
}
- SCM basic = get_property ("basicTieProperties");
+ SCM basic = get_property ("Tie");
SCM sparse = get_property ("sparseTies");
if (to_boolean (sparse))
{
SCM pair = gh_list_ref (head_list, gh_int2scm (i/2));
- Tie * p = new Tie (basic);
+ Spanner * p = new Spanner (basic);
Tie::set_head (p,LEFT, dynamic_cast<Item*> (unsmob_element (gh_car (pair))));
Tie::set_head (p,RIGHT, dynamic_cast<Item*> (unsmob_element (gh_cdr (pair))));
tie_p_arr_.push (p);
- announce_element (Score_element_info (p, req_l_));
+ announce_element (p, req_l_);
}
else for (SCM s = head_list; gh_pair_p (s); s = gh_cdr (s))
{
- Tie * p = new Tie (basic);
+ Score_element * p = new Spanner (basic);
Tie::set_interface (p);
Tie::set_head (p, LEFT, dynamic_cast<Item*> (unsmob_element (gh_caar (s))));
Tie::set_head (p, RIGHT, dynamic_cast<Item*> (unsmob_element (gh_cdar (s))));
tie_p_arr_.push (p);
- announce_element (Score_element_info (p, req_l_));
+ announce_element (p, req_l_);
}
if (!tie_p_arr_.size ())
{
- req_l_->warning (_ ("No ties were created!"));
+ req_l_->origin ()->warning (_ ("No ties were created!"));
}
else if (tie_p_arr_.size () > 1 && !tie_column_p_)
{
- tie_column_p_ = new Spanner (get_property ("basicTieColumnProperties"));
+ tie_column_p_ = new Spanner (get_property ("TieColumn"));
Tie_column::set_interface (tie_column_p_);
for (int i = tie_p_arr_.size (); i--; )
Tie_column::add_tie (tie_column_p_,tie_p_arr_ [i]);
- announce_element (Score_element_info (tie_column_p_, 0));
+ announce_element (tie_column_p_, 0);
}
}
}
new_head_drul[d] = Tie::head(her,(Direction)-d);
} while (flip(&d) != LEFT);
- index_set_cell (her->get_elt_property ("heads"), LEFT, new_head_drul[LEFT]->self_scm_ );
- index_set_cell (her->get_elt_property ("heads"), RIGHT, new_head_drul[RIGHT]->self_scm_ );
+ index_set_cell (her->get_elt_property ("heads"), LEFT, new_head_drul[LEFT]->self_scm () );
+ index_set_cell (her->get_elt_property ("heads"), RIGHT, new_head_drul[RIGHT]->self_scm () );
typeset_element (her);
}
CHead_melodic_tuple::pitch_compare (CHead_melodic_tuple const&h1,
CHead_melodic_tuple const &h2)
{
- return Melodic_req::compare (*h1.req_l_, *h2.req_l_);
+ 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;
}
int