]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.13
authorfred <fred>
Mon, 2 Dec 1996 00:35:06 +0000 (00:35 +0000)
committerfred <fred>
Mon, 2 Dec 1996 00:35:06 +0000 (00:35 +0000)
hdr/voice.hh
src/rhythmstaff.cc
src/simplestaff.cc
src/simplewalker.cc
src/template2.cc
src/template3.cc
src/voice.cc

index db2e0872cf1c87d7a4af84385e98ce54fa41643b..c716c650dc45eb7e1df060296806a14ce6040fae 100644 (file)
@@ -1,9 +1,8 @@
 #ifndef VOICE_HH
 #define VOICE_HH
 
-
+#include "proto.hh"
 #include "plist.hh"
-#include "request.hh"
 
 /// class for  horizontal stuff.
 struct Voice {
@@ -36,9 +35,6 @@ struct Voice_element {
     const Voice *voice_;
     IPointerList<Request*> reqs;
 
-   PointerList<const Item *> granted_items;
-    PointerList<const Spanner *> granted_spanners;
-
     /****************/
     
     void add(Request*);
index c9a7831c1b373fedb672c6d554bb916ecf78af15..6c986a62ccc1bf86ba688c53e775279d4d259a6f 100644 (file)
@@ -1,4 +1,6 @@
 #include "molecule.hh"
+#include "score.hh"
+#include "request.hh"
 #include "notehead.hh"
 #include "stem.hh"
 #include "linestaff.hh"
@@ -17,7 +19,8 @@ Rhythmic_staff::set_output(PScore*ps)
 Item *
 Rhythmic_staff::get_TYPESET_item(Command *com)
 {
-    if (com->args[0] == "KEY" || com->args[0] == "CLEF")
+    if (com->args[0] == "KEY" || com->args[0] == "CLEF"||
+       com->args[0] == "CURRENTCLEF")
        return 0;
     Item *i = Simple_staff::get_TYPESET_item(com);
     if (!i) return 0;
index 1afe0eed08f98b995b9117bbead75b4c08424215..6437b65c3a0764f1c59748d02b53ebbc221654cb 100644 (file)
@@ -1,4 +1,5 @@
 #include "request.hh"
+#include "voice.hh"
 #include "swalker.hh"
 #include "debug.hh"
 #include "clef.hh"
index 4918b5e6fa2af418e627b5d5e5b5c788e8138781..7705e045a922ec577189bcf90414736d03aa6021 100644 (file)
@@ -1,4 +1,5 @@
 #include "request.hh"
+#include "voice.hh"
 #include "clef.hh"
 #include "beam.hh"
 #include "pscore.hh"
@@ -35,7 +36,7 @@ Simple_walker::do_INTERPRET_command(Command*com)
        s.del(0);
        clef_.read(s);
     } else {
-       WARN << " ignoring INTERPRET command: " << com->args[0];
+       WARN << " ignoring INTERPRET command: " << com->args[0]<< '\n';
     }
 }
 
@@ -50,11 +51,10 @@ Simple_walker::do_TYPESET_command(Command*com)
        else
            com->args[0] = "KEY"; 
     
-    if (com->args[0] == "CURRENTCLEF")
-       if (processed_clef) {       
+    if (com->args[0] == "CURRENTCLEF") {
+       if (processed_clef) 
            return;
-       } else
-           com->args[0] = "CLEF";
+    }
     
 
     Item* i = staff()->get_TYPESET_item(com);
@@ -71,9 +71,11 @@ Simple_walker::do_TYPESET_command(Command*com)
        ((Keyitem*) i)->read(typesetkey); // ugh        
     }
 
-    if (com->args[0] == "CLEF") {
+    if (com->args[0] == "CLEF"||com->args[0] == "CURRENTCLEF") {
        processed_clef =true;
-       ((Clef_item*)i)->read(clef_);   
+       Clef_item*c=(Clef_item*)i;
+       c->read(clef_);
+       c->change = (break_status != BREAK_POST - BREAK_PRE);
     }
     col()->typeset_item_directional(i, 1, break_status);
 }
@@ -84,6 +86,7 @@ Simple_walker::do_local_key(Note_req*n)
     if ( local_key_.oct(n->octave).acc(n->name) != n->accidental) {
        if (!local_key_item_) {
            local_key_item_ = staff()->get_local_key_item();
+           local_key_item_->c0_position = clef_.c0_pos;
        }
        
        local_key_item_->add(n->octave, n->name, n->accidental);        
@@ -125,7 +128,8 @@ Simple_walker::process_requests()
     Simple_staff *s = staff();
     if (c->beam_&& c->beam_->spantype == Span_req::START) {
        if (beam_)
-           error("Too many beams");
+           error("Too many beams (t = "
+                         +String(c->when())+")");
        beam_ = new Beam;
     }
     for (int i=0; i < c->slurs.sz(); i++) {
@@ -148,13 +152,17 @@ Simple_walker::process_requests()
     }
     
     if (beam_) {
+       if (!stem_)
+           error("beamed note should have a stem (t = " 
+                 +String(c->when())+")");
        beam_->add(stem_);
     }
     if (stem_) {
        c->typeset_item(stem_);
        /* needed, otherwise placement of
           local_key fucks up */
-       stem_->set_default_extents();
+//     stem_->set_default_extents();
+       // can somebody explain myself?
     }
     if (c->beam_&& c->beam_->spantype == Span_req::STOP) {
        pscore_->typeset_spanner(beam_, s->theline);
index 23e6aae20027b972cadd0e9677eb59c9d1391e70..d2d42f954f258431baef1b0888f9d4eee714484c 100644 (file)
@@ -1,7 +1,7 @@
 
 #include "symbol.hh"
 #include "voice.hh"
-
+#include "request.hh"
 #include "staff.hh"
 #include "sccol.hh"
 #include "stcol.hh"
index a457b6afbbf84fd7c4fe528e3c6001298f9db64e..80921422faf386aa7c3bfb01305be9c788a92d32 100644 (file)
@@ -1,4 +1,3 @@
-#include "request.hh"
 #include "command.hh"
 #include "molecule.hh"
 #include "plist.cc"
@@ -6,5 +5,5 @@
 
 IPL_instantiate(Atom);
 IPL_instantiate(Command);
-IPL_instantiate(Request);
+
 
index fbdb207aab283334bfd75b2ffdaff12e59e2590b..8a1c136d04b32389fef812191696ca85a5c559d0 100644 (file)
@@ -1,5 +1,6 @@
 #include "debug.hh"
 #include "voice.hh"
+#include "request.hh"
 
 Voice::Voice(Voice const&src)
 {
@@ -74,5 +75,5 @@ Voice_element::Voice_element(Voice_element const&src)
     voice_=src.voice_;
     IPointerList__copy(Request*, reqs, src.reqs, clone());
     group=src.group;
-    assert(!granted_items.size() && !granted_spanners.size());
+//    assert(!granted_items.size() && !granted_spanners.size());
 }