source file of the GNU LilyPond music typesetter
- (c) 2000--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 2000--2004 Jan Nieuwenhuizen <janneke@gnu.org>
Chris Jackson <chris@fluffhouse.org.uk> - extended to support
bracketed pedals.
bool
Piano_pedal_engraver::try_music (Music *m)
{
- if (m->is_mus_type ("abort-event"))
- {
- for (Pedal_info*p = info_list_; p->name_; p ++)
- {
- p->event_drul_[START] = 0;
- p->event_drul_[STOP] = 0;
-
- if (p->bracket_)
- p->bracket_->suicide ();
- p->bracket_ = 0;
- }
- }
- else if (m->is_mus_type ("pedal-event"))
+ if (m->is_mus_type ("pedal-event"))
{
for (Pedal_info*p = info_list_; p->name_; p ++)
{
if (!p->line_spanner_)
{
String name = String (p->name_) + "PedalLineSpanner";
- p->line_spanner_ = new Spanner (get_property (name.to_str0 ()));
+ p->line_spanner_ = make_spanner (name.to_str0 ());
Music * rq = (p->event_drul_[START] ? p->event_drul_[START] : p->event_drul_[STOP]);
announce_grob (p->line_spanner_, rq->self_scm ());
{
String propname = String (p->name_) + "Pedal";
- SCM b = get_property (propname.to_str0 ());
- p->item_ = new Item (b);
+ p->item_ = make_item (propname.to_str0 ());
p->item_->set_grob_property ("text", s);
Axis_group_interface::add_element (p->line_spanner_, p->item_);
p->bracket_->set_bound (RIGHT, cmc);
/*
- Set properties so that the molecule-creating function will
+ Set properties so that the stencil-creating function will
know whether the right edge should be flared ___/
*/
p->start_ev_ = p->event_drul_[START];
p->current_bracket_ev_ = p->event_drul_[START];
- p->bracket_ = new Spanner (get_property ("PianoPedalBracket"));
+ p->bracket_ = make_spanner ("PianoPedalBracket");
/*
- Set properties so that the molecule-creating function will
+ Set properties so that the stencil-creating function will
know whether the left edge should be flared \___
*/
/* Set this property for 'mixed style' pedals, Ped._______/\ ,
- so the molecule function will shorten the ____ line by the length of the Ped. text.
+ so the stencil function will shorten the ____ line by the length of the Ped. text.
*/
if (mixed)
if (p->finished_line_spanner_)
{
- Side_position_interface::add_staff_support (p->finished_line_spanner_);
Grob * l = p->finished_line_spanner_->get_bound (LEFT);
Grob * r = p->finished_line_spanner_->get_bound (RIGHT);
if (!r && l)
ENTER_DESCRIPTION (Piano_pedal_engraver,
/* descr */ "Engrave piano pedal symbols and brackets.",
/* creats*/ "SostenutoPedal SustainPedal UnaCordaPedal SostenutoPedalLineSpanner SustainPedalLineSpanner UnaCordaPedalLineSpanner",
-/* accepts */ "pedal-event abort-event",
+/* accepts */ "pedal-event",
/* acks */ "note-column-interface",
/* reads */ "pedalSostenutoStrings pedalSustainStrings pedalUnaCordaStrings pedalSostenutoStyle pedalSustainStyle pedalUnaCordaStyle",
/* write */ "");