/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2000--2011 Jan Nieuwenhuizen <janneke@gnu.org>,
+ Copyright (C) 2000--2014 Jan Nieuwenhuizen <janneke@gnu.org>,
Erik Sandberg <mandolaerik@gmail.com>
Chris Jackson <chris@fluffhouse.org.uk> - extended to support
DECLARE_TRANSLATOR_LISTENER (sustain);
DECLARE_TRANSLATOR_LISTENER (una_corda);
DECLARE_TRANSLATOR_LISTENER (sostenuto);
- DECLARE_ACKNOWLEDGER (note_column);
void stop_translation_timestep ();
void process_music ();
info_list_[NUM_PEDAL_TYPES].type_ = 0;
}
-/*
- Urg: Code dup
- I'm a script
-*/
-void
-Piano_pedal_engraver::acknowledge_note_column (Grob_info info)
-{
- for (Pedal_info *p = info_list_; p->type_; p++)
- {
- if (p->bracket_)
- add_bound_item (p->bracket_, info.grob ());
- if (p->finished_bracket_)
- add_bound_item (p->finished_bracket_, info.grob ());
- }
-}
-
IMPLEMENT_TRANSLATOR_LISTENER (Piano_pedal_engraver, sostenuto);
void
Piano_pedal_engraver::listen_sostenuto (Stream_event *ev)
mixed: Ped. _____/\____|
*/
- SCM style = internal_get_property (p->type_->style_sym_);
+ SCM style = get_property (p->type_->style_sym_);
bool mixed = style == ly_symbol2scm ("mixed");
bool bracket = (mixed
Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
{
SCM s = SCM_EOL;
- SCM strings = internal_get_property (p->type_->strings_sym_);
+ SCM strings = get_property (p->type_->strings_sym_);
if (scm_ilength (strings) < 3)
{
{
assert (!p->finished_bracket_);
- Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
-
- if (!p->bracket_->get_bound (RIGHT))
- p->bracket_->set_bound (RIGHT, cmc);
+ Grob *cmc = Grob::unsmob (get_property ("currentMusicalColumn"));
+ p->bracket_->set_bound (RIGHT, cmc);
/*
Set properties so that the stencil-creating function will
if (p->bracket_)
{
SCM cc = get_property ("currentCommandColumn");
- Item *c = unsmob_item (cc);
+ Item *c = Item::unsmob (cc);
p->bracket_->set_bound (RIGHT, c);
p->finished_bracket_ = p->bracket_;
typeset_all (p);
if (p->bracket_ && !p->bracket_->get_bound (LEFT))
{
- Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
-
- if (!p->bracket_->get_bound (LEFT))
- p->bracket_->set_bound (LEFT, cmc);
+ Grob *cmc = Grob::unsmob (get_property ("currentMusicalColumn"));
+ p->bracket_->set_bound (LEFT, cmc);
}
}
{
Grob *r = p->finished_bracket_->get_bound (RIGHT);
if (!r)
- p->finished_bracket_->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn")));
+ p->finished_bracket_->set_bound (RIGHT, Grob::unsmob (get_property ("currentMusicalColumn")));
p->finished_bracket_ = 0;
}
}
-ADD_ACKNOWLEDGER (Piano_pedal_engraver, note_column);
-
ADD_TRANSLATOR (Piano_pedal_engraver,
/* doc */
"Engrave piano pedal symbols and brackets.",