]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/chord-tremolo-engraver.cc
* lily/sequential-music.cc: remove file.
[lilypond.git] / lily / chord-tremolo-engraver.cc
index 41b5448fcd2a21a73dbe2d2af8ef0836d8b76e72..a9bb0f0b2c6e8ed936aff7fc27e0e49e06dcc3b7 100644 (file)
@@ -7,13 +7,11 @@
   
 */
 
-#include "engraver.hh"
 #include "beam.hh"
 #include "repeated-music.hh"
 #include "stem.hh"
 #include "rhythmic-head.hh"
 #include "engraver-group-engraver.hh"
-#include "event.hh"
 #include "warn.hh"
 #include "misc.hh"
 #include "note-head.hh"
@@ -71,7 +69,7 @@ protected:
 Chord_tremolo_engraver::Chord_tremolo_engraver ()
 {
   beam_  = finished_beam_ = 0;
-  repeat_ =0;
+  repeat_ = 0;
   flags_ = 0;
   stem_tremolo_ = 0;
   sequential_body_b_ = false;
@@ -90,12 +88,12 @@ Chord_tremolo_engraver::try_music (Music * m)
       start_mom_ = now_mom ();
       stop_mom_ = start_mom_ + l;
 
-      Sequential_music * seq = dynamic_cast<Sequential_music*> (rp->body ());
-      sequential_body_b_ = seq;
+      
+      sequential_body_b_ = rp->body()->is_mus_type ("sequential-music");
 
-      int elt_count = seq ? scm_ilength (seq-> music_list ()) : 1;
+      int elt_count = sequential_body_b_ ? scm_ilength (rp->body()->get_property ("elements")) : 1;
 
-      if (seq && elt_count != 2)
+      if (sequential_body_b_ && elt_count != 2)
        {
          rp->origin ()->warning (_f ("Chord tremolo with %d elements. Must have two elements.", elt_count));
        }
@@ -124,7 +122,6 @@ Chord_tremolo_engraver::process_music ()
       beam_ = make_spanner ("Beam", repeat_->self_scm ());
       beam_->set_property ("chord-tremolo", SCM_BOOL_T);
 
-      SCM smp = 
       beam_start_location_ = robust_scm2moment (get_property ("measurePosition"), Moment (0));
     }
 }
@@ -217,7 +214,7 @@ Chord_tremolo_engraver::stop_translation_timestep ()
 
 
 
-ENTER_DESCRIPTION (Chord_tremolo_engraver,
+ADD_TRANSLATOR (Chord_tremolo_engraver,
 /* descr */       "Generates beams for  tremolo repeats.",
 /* creats*/       "Beam",
 /* accepts */     "repeated-music",