]> git.donarmstrong.com Git - lilypond.git/blobdiff - src/voice.cc
partial: 0.0.39-1.jcn
[lilypond.git] / src / voice.cc
index 3dd4becf218270afe77904ce964fc22499ee4cb6..6301f299451916d676a84c934e8ecf4d74dda6c3 100644 (file)
@@ -10,6 +10,9 @@
 #include "voice.hh"
 #include "musicalrequest.hh"
 #include "commandrequest.hh"
+#include "midi-item.hh"
+#include "midi-stream.hh"
+#include "voice-element.hh"
 
 void
 Voice::set_default_group(String s)
@@ -17,6 +20,26 @@ Voice::set_default_group(String s)
     elts.top()->set_default_group(s);
 }
 
+bool
+Voice::find_plet_start_bo(char c, Moment& moment_r)
+{
+    for (iter_bot(elts, i); i.ok(); i--)
+       if ( i->find_plet_start_bo(c, moment_r) )
+           return true;
+    return false;
+}
+
+void 
+Voice::set_plet_backwards(Moment& now_moment_r, Moment until_moment,
+                         int num_i, int den_i)
+{
+    for (iter_bot(elts, i); i.ok(); i--) 
+       if ( now_moment_r <= until_moment ) 
+           i->set_plet_backwards(now_moment_r, until_moment, num_i, den_i);
+       else
+           return;
+}
+
 Voice::Voice(Voice const&src)
 {
     for (iter_top(src.elts, i); i.ok(); i++)
@@ -27,7 +50,7 @@ Voice::Voice(Voice const&src)
 
 Voice::Voice()
 {
-    start = 0.0;
+    start = 0;
 }
 
 void
@@ -41,9 +64,10 @@ void
 Voice::print() const
 {
 #ifndef NPRINT
-    mtor << "start: "<< start<<eol;
+    mtor << "Voice { start: "<< start<<eol;
     for (iter_top(elts,i); i.ok(); i++)
        i->print();
+    mtor << "}\n";
 #endif
 }