+2002-07-14 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * lily/voice-devnull-engraver.cc (acknowledge_grob): Use proper
+ spelling for always. In solo a due mode, kill spanners when the
+ other thread has solo.
+
+ * lily/thread-devnull-engraver.cc (acknowledge_grob): In solo a
+ due mode, kill everything when the other thread has solo.
+
+ * lily/a2-engraver.cc (acknowledge_grob): In solo a due mode, do
+ not set directions when we have solo.
+
+ * lily/part-combine-music-iterator.cc (process): Set property
+ "othersolo" if the other thread has solo.
+
2002-07-13 Han-Wen <hanwen@cs.uu.nl>
* lily/beam.cc (calc_stem_y): fix beams on quarter notes.
d = DOWN;
/* Must only set direction for VoiceCombines, not for StaffCombines:
- we can't detect that here, so, ugh, yet another property */
+ we can't detect that here, so we use yet another property */
if (!to_boolean (get_property ("noDirection"))
&& (Stem::has_interface (i.grob_l_)
|| Slur::has_interface (i.grob_l_)
|| Tie::has_interface (i.grob_l_)
- /*
- Usually, dynamics are removed by *_devnull_engravers for the
- second voice. On the one hand, we don't want all dynamics for
- the first voice to be placed above the staff. On the other
- hand, colliding of scripts may be worse.
- So, we don't set directions for these when we're playing solo.
- */
- || (i.grob_l_->internal_has_interface (ly_symbol2scm ("dynamic-interface"))
+ /* Usually, dynamics are removed by *_devnull_engravers for
+ the second voice. On the one hand, we don't want all
+ dynamics for the first voice to be placed above the
+ staff. On the other hand, colliding of scripts may be
+ worse. So, we don't set directions for these when we're
+ playing solo. */
+ || (i.grob_l_->internal_has_interface (ly_symbol2scm
+ ("dynamic-interface"))
&& state_ != SOLO)
- || (i.grob_l_->internal_has_interface (ly_symbol2scm ("text-interface"))
+ || (i.grob_l_->internal_has_interface (ly_symbol2scm
+ ("text-interface"))
&& state_ != SOLO)
))
{
- /*
- Hmm. We must set dir when solo, in order to get
- the rests collided to the right position
- */
- if ((unirhythm != SCM_BOOL_T) || (solo == SCM_BOOL_T)
- || ((unisilence == SCM_BOOL_T && previous_state != UNISON))
- || (unirhythm == SCM_BOOL_T && split_interval == SCM_BOOL_T
- && (unison != SCM_BOOL_T || solo_adue != SCM_BOOL_T)))
+ /* When in solo a due mode, and we have solo, every grob in
+ other thread gets annihilated, so we don't set dir.
+
+ Maybe that should be optional? */
+ if ((solo != SCM_BOOL_T && solo_adue == SCM_BOOL_T)
+
+ /* When not same rhythm, we set dir */
+ && (unirhythm != SCM_BOOL_T
+ /* When both have rests, but previously played something
+ different, we set dir */
+ || ((unisilence == SCM_BOOL_T && previous_state != UNISON))
+ /* When same rhythm, and split stems, but not same pitch
+ or not solo a du mode, we set dir */
+ || (unirhythm == SCM_BOOL_T && split_interval == SCM_BOOL_T
+ && (unison != SCM_BOOL_T || solo_adue != SCM_BOOL_T))))
{
- /*
- Blunt axe method: every grob gets a propertysetting.
- */
+ /* Blunt axe method: every grob gets a propertysetting. */
i.grob_l_->set_grob_property ("direction", gh_int2scm (d));
}
}
- /*
- todo: should we have separate state variable for being "rest while
- other has solo?" */
- if ( Multi_measure_rest::has_interface (i.grob_l_) && d )
+ /* Should we have separate state variable for being "rest
+ while other has solo?" */
+ if (Multi_measure_rest::has_interface (i.grob_l_) && d)
if (state_ == UNIRHYTHM
&& unisilence != SCM_BOOL_T)
{
*/
if (suffix_.empty_b ())
- suffix_ = first_iter_p_->report_to_l ()->daddy_trans_l_->id_str_.cut_str (3, INT_MAX);
+ suffix_ = first_iter_p_->report_to_l ()
+ ->daddy_trans_l_->id_str_.cut_str (3, INT_MAX);
int state = get_state (m);
if (state)
else
state = state_;
- Part_combine_music const *p = dynamic_cast<Part_combine_music const* > (music_l ());
+ Part_combine_music const *p =
+ dynamic_cast<Part_combine_music const* > (music_l ());
bool previously_combined_b = first_iter_p_->report_to_l ()->daddy_trans_l_
first_translator->set_property ("solo", b1);
second_translator->set_property ("solo", b2);
+ /* Can't these be computed? */
+ first_translator->set_property ("othersolo", b2);
+ second_translator->set_property ("othersolo", b1);
+
if (first_iter_p_->ok ())
first_iter_p_->process (m);
if (s == ly_symbol2scm ("always")
|| (s == SCM_EOL
- && daddy_trans_l_->id_str_.left_str (3) == "two"
- && (to_boolean (get_property ("unison"))
- || to_boolean (get_property ("unisilence")))
- && to_boolean (get_property ("soloADue"))))
+ && to_boolean (get_property ("soloADue"))
+ && ((daddy_trans_l_->id_str_.left_str (3) == "two"
+ && (to_boolean (get_property ("unison"))
+ || to_boolean (get_property ("unisilence"))))
+
+ /* Maybe this should be optional? */
+ || to_boolean (get_property ("othersolo")))))
{
- /* Ugh, we can suicide them, but they remain living */
i.grob_l_->suicide ();
}
}
return;
#endif
- if (s == ly_symbol2scm ("allways")
+#if 0 /* We used to have have this until 1.5.68. Not sure about
+ soloADue requirement */
+ if (s == ly_symbol2scm ("always")
|| (s == SCM_EOL
&& daddy_trans_l_->id_str_.left_str (3) == "two"
&& (to_boolean (get_property ("unison"))
|| to_boolean (get_property ("unisilence")))))
+#else
+ if (s == ly_symbol2scm ("always")
+ || (s == SCM_EOL
+ && to_boolean (get_property ("soloADue"))
+ && ((daddy_trans_l_->id_str_.left_str (3) == "two"
+ && (to_boolean (get_property ("unison"))
+ || to_boolean (get_property ("unisilence"))))
+
+ /* Maybe this should be optional? */
+ || to_boolean (get_property ("othersolo")))))
+#endif
+
for (char const **p = junk_interfaces; *p; p++)
if (i.grob_l_->internal_has_interface (ly_symbol2scm (*p)))
{
- /* Ugh, we can suicide them, but they remain living */
i.grob_l_->suicide ();
return;
}