]> git.donarmstrong.com Git - lilypond.git/commitdiff
fix midi lengths for drum notes too.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 11 Jan 2007 14:40:18 +0000 (15:40 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 11 Jan 2007 14:40:18 +0000 (15:40 +0100)
lily/drum-note-performer.cc

index 1e64ef6c3a9d7b408a1a8ab753c305cb347039b9..c81fca04825bcfb2de26d93eb13ecaa646378753 100644 (file)
@@ -64,7 +64,15 @@ Drum_note_performer::process_music ()
                 tie_event = ev;
             }
 
-         Audio_note *p = new Audio_note (*pit, get_event_length (n), 
+         Moment len = get_event_length (n);
+         if (now_mom().grace_part_)
+           {
+             len.grace_part_ = len.main_part_;
+             len.main_part_ = Rational (0);
+           }
+             
+
+         Audio_note *p = new Audio_note (*pit, len,
                                           tie_event, Pitch (0, 0, 0));
          Audio_element_info info (p, n);
          announce_element (info);