]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/drum-note-performer.cc
Merge branch 'cvs-head' of git+ssh://repo.or.cz/srv/git/lilypond
[lilypond.git] / lily / drum-note-performer.cc
index 112ad6972c8ad872d149268629b0f8945a26cc8d..19ba7bbf90d2ca01548443a7af8649ce53480a1b 100644 (file)
@@ -51,7 +51,22 @@ Drum_note_performer::process_music ()
 
       if (Pitch *pit = unsmob_pitch (defn))
        {
-         Audio_note *p = new Audio_note (*pit, get_event_length (n), 0);
+          SCM articulations = n->get_property ("articulations");
+          Stream_event *tie_event = 0;
+          for (SCM s = articulations;
+               !tie_event && scm_is_pair (s);
+               s = scm_cdr (s))
+            {
+              Stream_event *ev = unsmob_stream_event (scm_car (s));
+              if (!ev)
+                continue;
+         
+              if (ev->in_event_class ("tie-event"))
+                tie_event = ev;
+            }
+
+         Audio_note *p = new Audio_note (*pit, get_event_length (n), 
+                                          tie_event, 0);
          Audio_element_info info (p, n);
          announce_element (info);
          notes_.push_back (p);
@@ -64,11 +79,6 @@ Drum_note_performer::process_music ()
 void
 Drum_note_performer::stop_translation_timestep ()
 {
-  // why don't grace notes show up here?
-  // --> grace notes effectively do not get delayed
-  Moment now = now_mom ();
-  for (vsize i = 0; i < notes_.size (); i++)
-    play_element (notes_[i]);
   notes_.clear ();
   note_evs_.clear ();
 }
@@ -81,5 +91,4 @@ Drum_note_performer::listen_note (Stream_event *ev)
 }
 
 ADD_TRANSLATOR (Drum_note_performer,
-               "Play drum notes.", "",
-               "note-event", "", "");
+               "Play drum notes.", "", "", "");