+2005-12-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/slur-configuration.cc (score_extra_encompass): don't use
+ bound->column() == avoid->column() for checking extents, as this
+ doesn't work for accidentals.
+
+ * lily/slur-engraver.cc (acknowledge_extra_object): remove
+ DynamicText hardcoding.
+
+ * lily/slur-scoring.cc (enumerate_attachments): robustness: don't
+ crash if bound stem is NULL
+
+ * lily/piano-pedal-performer.cc: patch by MWD for enabling piano
+ pedals.
+
2005-12-22 Graham Percival <gpermus@gmail.com>
* scm/define-markup-commands.scm: typo. @code{\raise}
2005-12-21 Han-Wen Nienhuys <hanwen@xs4all.nl>
- * stepmake/bin/install.py (dest): don't create existing.
+ * lily/slur-configuration.cc (score_extra_encompass): don't use
+ "avoid" choice for avoid-slur.
+
+ * stepmake/bin/install.py (dest): don't create existing dir.
2005-12-21 Jan Nieuwenhuizen <janneke@gnu.org>
Vincenzo Colonnella
Werner Lemberg
Will Oram
+Wolfgang Hoffmann
Release 2.6
***********
/*
Debugging options: switch on
+
+ Cannot switch on -DNDEBUG, because it causes weird errors if you mix
+ DNDEBUG and normal builds.
*/
-#ifndef NDEBUG
#define DEBUG_SLUR_SCORING 1
-#endif
#endif /* MAIN_HH */
Grob *slur_head_;
Grob *staff_;
Grob *stem_;
- Interval slur_head_extent_;
+ Interval slur_head_x_extent_;
Real staff_space_;
Bound_info ()
a->type_string_ = String (p->name_);
a->dir_ = STOP;
audios_.push (a);
+ Audio_element_info info(a, p->event_drul_[STOP]);
+ announce_element (info);
}
p->start_event_ = 0;
}
a->type_string_ = String (p->name_);
a->dir_ = START;
audios_.push (a);
+ Audio_element_info info(a, p->event_drul_[START]);
+ announce_element (info);
}
p->event_drul_[START] = 0;
p->event_drul_[STOP] = 0;
distance.
*/
Item *as_item = dynamic_cast<Item *> (state.extra_encompass_infos_[j].grob_);
- if ((as_item
- && as_item->get_column ()
- == state.extremes_[d].bound_->get_column ())
- || state.extra_encompass_infos_[j].extents_[X_AXIS].contains (attachment[d][X_AXIS]))
+ if (!as_item)
+ continue;
+
+ Interval item_x = as_item->extent (state.common_[X_AXIS], X_AXIS);
+ item_x.intersect (state.extremes_[d].slur_head_x_extent_);
+ if (!item_x.is_empty ())
{
y = attachment[d][Y_AXIS];
found = true;
}
+
}
while (flip (&d) != LEFT);
}
Real dist = 0.0;
- if (info.type_ == ly_symbol2scm ("avoid"))
+ if (info.type_ == ly_symbol2scm ("around"))
dist = info.extents_[Y_AXIS].distance (y);
/*
void
Slur_engraver::acknowledge_extra_object (Grob_info info)
{
+ if (slurs_.is_empty ()
+ && end_slurs_.is_empty ())
+ return ;
+
Grob *e = info.grob ();
SCM avoid = e->get_property ("avoid-slur");
if (Tie::has_interface (e)
for (int i = end_slurs_.size (); i--;)
Slur::add_extra_encompass (end_slurs_[i], e);
}
- else if ((avoid == ly_symbol2scm ("outside")
- || avoid == ly_symbol2scm ("around"))
- && e->name () != "DynamicText")
+ else if (avoid == ly_symbol2scm ("outside")
+ || avoid == ly_symbol2scm ("around"))
{
Grob *slur = slurs_.size () ? slurs_[0] : 0;
slur = (end_slurs_.size () && !slur)
void
Slur_engraver::acknowledge_text_script (Grob_info info)
{
+ // if (!info.grob ()->internal_has_interface (ly_symbol2scm ("DynamicText")))
acknowledge_extra_object (info);
}
{
extremes[d].note_column_ = extremes[d].bound_;
extremes[d].stem_ = Note_column::get_stem (extremes[d].note_column_);
- extremes[d].stem_dir_ = get_grob_direction (extremes[d].stem_);
-
- for (int a = X_AXIS; a < NO_AXES; a++)
+ if (extremes[d].stem_)
{
- Axis ax = Axis (a);
- Interval s = extremes[d].stem_->extent (common_[ax], ax);
- if (s.is_empty ())
+ extremes[d].stem_dir_ = get_grob_direction (extremes[d].stem_);
+
+ for (int a = X_AXIS; a < NO_AXES; a++)
{
- /*
- do not issue warning. This happens for rests and
- whole notes.
- */
- s = Interval (0, 0)
- + extremes[d].stem_->relative_coordinate (common_[ax], ax);
+ Axis ax = Axis (a);
+ Interval s = extremes[d].stem_->extent (common_[ax], ax);
+ if (s.is_empty ())
+ {
+ /*
+ do not issue warning. This happens for rests and
+ whole notes.
+ */
+ s = Interval (0, 0)
+ + extremes[d].stem_->relative_coordinate (common_[ax], ax);
+ }
+ extremes[d].stem_extent_[ax] = s;
}
- extremes[d].stem_extent_[ax] = s;
- }
- extremes[d].slur_head_
- = Stem::extremal_heads (extremes[d].stem_)[dir];
- if (!extremes[d].slur_head_
- && Note_column::has_rests (extremes[d].bound_))
- extremes[d].slur_head_ = Note_column::get_rest (extremes[d].bound_);
+ extremes[d].slur_head_
+ = Stem::extremal_heads (extremes[d].stem_)[dir];
+ if (!extremes[d].slur_head_
+ && Note_column::has_rests (extremes[d].bound_))
+ extremes[d].slur_head_ = Note_column::get_rest (extremes[d].bound_);
+ extremes[d].staff_ = Staff_symbol_referencer
+ ::get_staff_symbol (extremes[d].stem_);
+ extremes[d].staff_space_ = Staff_symbol_referencer
+ ::staff_space (extremes[d].stem_);
+ }
if (extremes[d].slur_head_)
- extremes[d].slur_head_extent_
+ extremes[d].slur_head_x_extent_
= extremes[d].slur_head_->extent (common_[X_AXIS], X_AXIS);
- extremes[d].staff_ = Staff_symbol_referencer
- ::get_staff_symbol (extremes[d].stem_);
- extremes[d].staff_space_ = Staff_symbol_referencer
- ::staff_space (extremes[d].stem_);
}
}
while (flip (&d) != LEFT);
Direction d = LEFT;
do
{
- if (!is_broken_)
+ if (!is_broken_
+ && extremes_[d].slur_head_)
musical_dy_ += d
* extremes_[d].slur_head_->relative_coordinate (common_[Y_AXIS], Y_AXIS);
}
Slur_score_state::move_away_from_staffline (Real y,
Grob *on_staff) const
{
+ if (!on_staff)
+ return y;
+
Grob *staff_symbol = Staff_symbol_referencer::get_staff_symbol (on_staff);
if (!staff_symbol)
return y;
do
{
if (extremes_[d].slur_head_
- && !extremes_[d].slur_head_extent_.is_empty ())
+ && !extremes_[d].slur_head_x_extent_.is_empty ())
{
- os[d][X_AXIS] = extremes_[d].slur_head_extent_.center ();
+ os[d][X_AXIS] = extremes_[d].slur_head_x_extent_.center ();
attach_to_stem[d] = false;
}
}
TODO: parameter */
os[d][X_AXIS]
- -= dir_ * extremes_[d].slur_head_extent_.length ()
+ -= dir_ * extremes_[d].slur_head_x_extent_.length ()
* sin (dz.arg ()) / 3;
}
}
(font-series . bold)
(font-encoding . fetaDynamic)
(font-shape . italic)
- (avoid-slur . avoid)
+ (avoid-slur . around)
(no-spacing-rods . #t)
(script-priority . 100)
(meta . ((class . Item)