]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/chord-name-engraver.cc
*** empty log message ***
[lilypond.git] / lily / chord-name-engraver.cc
index 10bff134a950ba9b9ff4c0eba01dcbb7663a6ce2..96377ba60bd8ea601a08c8b824bca3174a00c044 100644 (file)
@@ -3,13 +3,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "engraver.hh"
 #include "chord-name.hh"
 #include "chord.hh"
-#include "musical-request.hh"
+#include "event.hh"
 #include "paper-def.hh"
 #include "font-interface.hh"
 #include "paper-def.hh"
@@ -28,7 +28,7 @@ protected:
   virtual bool try_music (Music *);
 
 private:
-  void add_note (Note_req *);
+  void add_note (Music *);
   
   Item* chord_name_;
 
@@ -46,7 +46,7 @@ Chord_name_engraver::Chord_name_engraver ()
 }
 
 void
-Chord_name_engraver::add_note (Note_req* n)
+Chord_name_engraver::add_note (Music * n)
 {
   SCM pitches = ly_car (chord_);
   SCM modifiers = ly_cdr (chord_);
@@ -66,9 +66,12 @@ Chord_name_engraver::add_note (Note_req* n)
 bool
 Chord_name_engraver::try_music (Music* m)
 {
-  if (Note_req* n = dynamic_cast<Note_req*> (m))
+  /*
+    hmm. Should check? 
+   */
+  if (m->is_mus_type ("note-event"))
     {
-      add_note (n);
+      add_note (m);
       return true;
     }
   return false;
@@ -104,10 +107,10 @@ Chord_name_engraver::stop_translation_timestep ()
 }
 
 ENTER_DESCRIPTION(Chord_name_engraver,
-/* descr */       "Catch Note_req's, Tonic_reqs, Inversion_reqs, Bass_req
-and generate the appropriate chordname.",
+/* descr */       "Catch note-events, Tonic_reqs, Inversion_reqs, Bass_req "
+"and generate the appropriate chordname.",
 /* creats*/       "ChordName",
-/* accepts */     "general-music",
+/* accepts */     "note-event busy-playing-event",
 /* acks  */      "",
 /* reads */       "chordChanges",
 /* write */       "");