]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.8
authorfred <fred>
Tue, 5 Nov 1996 19:48:50 +0000 (19:48 +0000)
committerfred <fred>
Tue, 5 Nov 1996 19:48:50 +0000 (19:48 +0000)
pscore.hh
rhythmstaff.cc
score.cc

index 58a6910bbd6731765463d95ad7db6a8c6fbbf855..91436b369ebf729db5d1895fabc18fefab7f2228 100644 (file)
--- a/pscore.hh
+++ b/pscore.hh
@@ -33,6 +33,9 @@ struct PScore {
     /****************************************************************/
 
     svec<Item*> select_items(PStaff*, PCol*);
+
+    /// before calc_breaking
+    void preprocess();
     
     void calc_breaking();
     /**
@@ -43,6 +46,9 @@ struct PScore {
       lines contain the broken lines.
      */
 
+    /// after calc_breaking
+    void postprocess();
+    
     /// search all pcols which are breakable.
     svec<const PCol *> find_breaks() const;
 
index 7e2706e02dc723107c77723f50a11e6c8d4820a5..98d17d522ce75b11621dfc056b4c6d67d9c27461 100644 (file)
@@ -1,4 +1,5 @@
 #include "molecule.hh"
+#include "notehead.hh"
 #include "stem.hh"
 #include "linestaff.hh"
 #include "rhythmstaff.hh"
@@ -28,9 +29,18 @@ Rhythmic_column::typeset_command(Command *com, int breakst)
 void
 Rhythmic_column::typeset_req(Request *rq)
 {
-    Item *i =new Item;
-    Molecule*m=create_req_mol(rq);
-    i->output=m;
+    Item *i ;
+    if (rq->note()) {
+       Notehead *n =new Notehead(1);
+       n->balltype = rq->rhythmic()->balltype;
+       n->dots = rq->rhythmic()->dots;
+       n->position = 0;
+       i = n;
+    } else if (rq->rest()) {
+       i =new Item;
+       Molecule*m=create_req_mol(rq);
+       i->output=m;
+    }
     typeset_item(i);
 }
 
@@ -40,9 +50,7 @@ Rhythmic_column::typeset_stem(Stem_req*rq)
     Stem * s = new Stem(0);
     s->minnote = s->maxnote = 0;
     s->flag = rq->stem_number;
-    s->calculate();
     typeset_item(s);
-    s->brew_molecole();
 }
 
 /*
index 097e2aa50d12f1d936f4f25045437999d2fd8793..1df13365f22900bf4ebcf957bab1c28e4a3ff57c 100644 (file)
--- a/score.cc
+++ b/score.cc
@@ -13,6 +13,7 @@ Score::set(Paperdef*p)
     delete paper_;
     paper_ = p;
 }
+
 void
 Score::output(String s)
 {
@@ -29,7 +30,7 @@ Score::output(String s)
 void
 Score::process()
 {
-    *mlog << "Processing ...";
+    *mlog << "Processing ... ";
     set(commands_->parse(last()));
     commands_->print();
     
@@ -53,8 +54,12 @@ Score::process()
     clean_cols();
     OK();
     //    print();
+
+    pscore_->preprocess();
     *mlog << "Calculating ... ";
     pscore_->calc_breaking();
+    pscore_->postprocess();
+
     // TODO: calculate vertical structs
     // TODO: calculate mixed structs.
     *mlog << "\n";