]> git.donarmstrong.com Git - lilypond.git/commitdiff
piano-pedal-engraver: use currentMusicalColumn as bounds; issue 2153
authorKeith OHara <k-ohara5a5a@oco.net>
Fri, 30 Dec 2011 03:36:21 +0000 (19:36 -0800)
committerKeith OHara <k-ohara5a5a@oco.net>
Thu, 5 Jan 2012 02:57:04 +0000 (18:57 -0800)
input/regression/pedal-bracket.ly
lily/piano-pedal-engraver.cc

index 007b8404799d3291243e38678004bc119b7ff4c0..b75c1eeddfe947cdcb83fc73e45b4277b83ccab4 100644 (file)
@@ -6,7 +6,8 @@
  the left side of the main note-column. If a note is shared between
  two brackets, these ends are flared.
 
-At a line-break, there are no vertical endings.  " }
+At a line-break, there are no vertical endings.  Pedal changes can
+be placed at spacer rests." }
 
 \score {
      \relative c'' {
@@ -19,7 +20,9 @@ At a line-break, there are no vertical endings.  " }
         \set Staff.pedalUnaCordaStyle = #'mixed
 
         c4 d \unaCorda e f g
-        b  | \break c b <c e,>\arpeggio \treCorde c
+        b  | \break c b <c e,>\arpeggio \treCorde c |
+        b8\sustainOn g d b <<c2 {s4 s4\sustainOff\sustainOn }>> |
+        g1
     }
     \layout { ragged-right = ##t }
 }
index 4cbc7adbd320abd22cd789ac0b584bfa8b30b9bf..2c656b6c5f7f3fa792478475d95a771d5aba6144 100644 (file)
@@ -126,7 +126,6 @@ protected:
   DECLARE_TRANSLATOR_LISTENER (sustain);
   DECLARE_TRANSLATOR_LISTENER (una_corda);
   DECLARE_TRANSLATOR_LISTENER (sostenuto);
-  DECLARE_ACKNOWLEDGER (note_column);
   void stop_translation_timestep ();
   void process_music ();
 
@@ -206,22 +205,6 @@ Piano_pedal_engraver::initialize ()
   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)
@@ -364,9 +347,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       assert (!p->finished_bracket_);
 
       Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
-
-      if (!p->bracket_->get_bound (RIGHT))
-        p->bracket_->set_bound (RIGHT, cmc);
+      p->bracket_->set_bound (RIGHT, cmc);
 
       /*
         Set properties so that the stencil-creating function will
@@ -464,9 +445,7 @@ Piano_pedal_engraver::stop_translation_timestep ()
       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);
+          p->bracket_->set_bound (LEFT, cmc);
         }
     }
 
@@ -500,8 +479,6 @@ Piano_pedal_engraver::typeset_all (Pedal_info *p)
     }
 }
 
-ADD_ACKNOWLEDGER (Piano_pedal_engraver, note_column);
-
 ADD_TRANSLATOR (Piano_pedal_engraver,
                 /* doc */
                 "Engrave piano pedal symbols and brackets.",