]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/piano-pedal-performer.cc
* lily/horizontal-bracket.cc (make_bracket): new function.
[lilypond.git] / lily / piano-pedal-performer.cc
index 554bbfab2c88b9cc312126b0f038d5451686c683..ea4889f11bbeb1ec3ed6c506d3e407d3a54eaa2e 100644 (file)
@@ -18,8 +18,8 @@ class Piano_pedal_performer : public Performer
   struct Pedal_info
   {
     char const *name_;
-    Music *start_req_;
-    Drul_array<Music *> req_drul_;
+    Music *start_event_;
+    Drul_array<Music *> event_drul_;
   };
 
 public:
@@ -29,9 +29,9 @@ public:
 protected:
   virtual void initialize ();
   virtual bool try_music (Music *);
-  virtual void create_audio_elements ();
-  PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
-  PRECOMPUTED_VIRTUAL void start_translation_timestep ();
+  void process_music ();
+  void stop_translation_timestep ();
+  void start_translation_timestep ();
 
 private:
   Link_array<Audio_piano_pedal> audios_;
@@ -59,9 +59,9 @@ Piano_pedal_performer::initialize ()
   do
     {
       p->name_ = *np;
-      p->req_drul_[START] = 0;
-      p->req_drul_[STOP] = 0;
-      p->start_req_ = 0;
+      p->event_drul_[START] = 0;
+      p->event_drul_[STOP] = 0;
+      p->start_event_ = 0;
 
       p++;
     }
@@ -69,17 +69,15 @@ Piano_pedal_performer::initialize ()
 }
 
 void
-Piano_pedal_performer::create_audio_elements ()
+Piano_pedal_performer::process_music ()
 {
   for (Pedal_info *p = info_alist_; p && p->name_; p++)
 
     {
-      if (p->req_drul_[STOP])
+      if (p->event_drul_[STOP])
        {
-         if (!p->start_req_)
-           {
-             p->req_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", String (p->name_)));
-           }
+         if (!p->start_event_)
+           p->event_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", String (p->name_)));
          else
            {
              Audio_piano_pedal *a = new Audio_piano_pedal;
@@ -87,19 +85,19 @@ Piano_pedal_performer::create_audio_elements ()
              a->dir_ = STOP;
              audios_.push (a);
            }
-         p->start_req_ = 0;
+         p->start_event_ = 0;
        }
 
-      if (p->req_drul_[START])
+      if (p->event_drul_[START])
        {
-         p->start_req_ = p->req_drul_[START];
+         p->start_event_ = p->event_drul_[START];
          Audio_piano_pedal *a = new Audio_piano_pedal;
          a->type_string_ = String (p->name_);
          a->dir_ = START;
          audios_.push (a);
        }
-      p->req_drul_[START] = 0;
-      p->req_drul_[STOP] = 0;
+      p->event_drul_[START] = 0;
+      p->event_drul_[STOP] = 0;
     }
 }
 
@@ -116,8 +114,8 @@ Piano_pedal_performer::start_translation_timestep ()
 {
   for (Pedal_info *p = info_alist_; p && p->name_; p++)
     {
-      p->req_drul_[STOP] = 0;
-      p->req_drul_[START] = 0;
+      p->event_drul_[STOP] = 0;
+      p->event_drul_[START] = 0;
     }
 }
 
@@ -130,10 +128,10 @@ Piano_pedal_performer::try_music (Music *r)
        {
          String nm = p->name_ + String ("Event");
          if (ly_is_equal (r->get_property ("name"),
-                           scm_str2symbol (nm.to_str0 ())))
+                          scm_str2symbol (nm.to_str0 ())))
            {
              Direction d = to_dir (r->get_property ("span-direction"));
-             p->req_drul_[d] = r;
+             p->event_drul_[d] = r;
              return true;
            }
        }
@@ -145,4 +143,4 @@ Piano_pedal_performer::try_music (Music *r)
 
 ADD_TRANSLATOR (Piano_pedal_performer, "", "",
                "pedal-event",
-               "", "", "");
+               "", "");