]> git.donarmstrong.com Git - lilypond.git/blobdiff - voice.cc
release: 0.0.5
[lilypond.git] / voice.cc
index ac6d33166d6058b2638a5a94b99d6c1a5237ed50..ae9342b487e1bbe48b5db86345dc19b536ea9a51 100644 (file)
--- a/voice.cc
+++ b/voice.cc
@@ -4,7 +4,7 @@
 void
 Voice_element::add(Request*r)
 {
-    if (r->tag == Request::NOTE ||r->tag == Request::REST) {
+    if (r->rhythmic()) {
        assert (!duration);         
        duration = r->duration();
     }
@@ -32,24 +32,29 @@ Voice_element::Voice_element()
 void
 Voice::print() const
 {
+        #ifndef NPRINT
+
     mtor << "start: "<< start<<eol;
     for (PCursor<Voice_element*> vec(elts); vec.ok(); vec++)
        vec->print();
+#endif
 }
 void
 Voice_element::print() const
 {
+#ifndef NPRINT
     mtor << "voice_element { dur :"<< duration <<"\n";
     for (PCursor<Request*> rc(reqs); rc.ok(); rc++) {
-       mtor << "reqtag: " << rc->tag<<eol;
+       rc->print();
     }
     mtor << "}\n";
+#endif
 }
 
-Mtime
+Real
 Voice::last() const
 {
-    Mtime l =start;
+    Real l =start;
     for (PCursor<Voice_element*> vec(elts); vec.ok(); vec++)
        l  += vec->duration;
     return l;