#include "grob-pitch-tuple.hh"
#include "warn.hh"
#include "note-head.hh"
+#include "staff-symbol-referencer.hh"
/**
Manufacture ties. Acknowledge noteheads, and put them into a
protected:
virtual void stop_translation_timestep ();
+ virtual void start_translation_timestep ();
virtual void acknowledge_grob (Grob_info);
virtual bool try_music (Music*);
virtual void process_acknowledged_grobs ();
event_ = mus;
}
- if (event_)
- {
- SCM m = get_property ("automaticMelismata");
- bool am = gh_boolean_p (m) &&gh_scm2bool (m);
- if (am)
- {
- daddy_trans_->set_property ("tieMelismaBusy", m ? SCM_BOOL_T : SCM_BOOL_F);
- }
- }
return true;
}
for (int i = heads_to_tie_.size (); i--;)
{
Grob *th = heads_to_tie_[i];
- int staff_pos = gh_scm2int (h->get_grob_property ("staff-position"));
- int left_staff_pos = gh_scm2int (th->get_grob_property ("staff-position"));
- if (staff_pos == left_staff_pos)
+ Music * right_mus = unsmob_music (h->get_grob_property ("cause"));
+ Music * left_mus = unsmob_music (th->get_grob_property ("cause"));
+
+ /*
+ maybe should check positions too.
+ */
+ if (right_mus && left_mus
+ && gh_equal_p (right_mus->get_mus_property ("pitch"),
+ left_mus->get_mus_property ("pitch")))
{
Grob * p = new Spanner (get_property ("Tie"));
Tie::set_interface (p); // cannot remove yet!
}
}
+void
+Tie_engraver::start_translation_timestep ()
+{
+ if (to_boolean (get_property ("automaticMelismata")))
+ daddy_trans_->set_property ("tieMelismaBusy",
+ gh_bool2scm (heads_to_tie_.size ()));
+
+}
void
Tie_engraver::stop_translation_timestep ()