]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.30
authorfred <fred>
Sun, 24 Mar 2002 19:31:19 +0000 (19:31 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:31:19 +0000 (19:31 +0000)
Makefile
TODO
hdr/directionalspanner.hh
hdr/slur.hh
hdr/slurreg.hh [new file with mode: 0644]
init/table_sixteen.ini
src/beam.cc
src/directionalspanner.cc
src/textspanner.cc

index 10ad8c1642fd81fb2f7248f877002dc001955e5e..7af694d132eecc3397b107daf6cedff27495439b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ $(exe): $(obs)
        $(CXX) -o $@ $^ $(LOADLIBES)
 
 
-.PHONY: clean
+.PHONY: clean docxx
 
 clean:
        rm -f $(exe) $(DOCDIR)/* core $(obs) $(ALLDEPS)
@@ -30,9 +30,8 @@ doc:
        $(MAKE) -C Documentation doc
 
 # doc++ documentation of classes
-docpp: $(progdocs)
-       -mkdir $(DOCDIR)
-       doc++ -p -I -d $(DOCDIR) $^
+docxx: $(progdocs)     
+       doc++ -p -d $(DOCDIR) $^
 
 $(OBJECTDIR)/%.o: $(CCDIR)/%.cc
        $(DODEP)\
diff --git a/TODO b/TODO
index a931f47d05d5458d61ec1aa18d460e67360a4ef9..44068657a7177b73dced4765fdae983dc282031c 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,19 +1,19 @@
-
-       ./input/standchen.ly.rej
-
-       ./src/stem.cc.rej
-
-       * scrap simplestaff
+This is an assorted collection of stuff that will be done, might be
+done, or is an idea that I want to think about
 
 BUGS
        * first clef isn't printed
 
-       * accidental placement for other clefs
+       * key undo
+
+       * key print if 
 
 SEVERELY LACKING:
 
        * grace notes
 
+       * dynamics (hairpins) 
+
 INPUTLANGUAGE
 
        * lose the $ and @ ?
@@ -26,12 +26,11 @@ INPUTLANGUAGE
 
 SMALLISH PROJECTS
 
+       * binsearch for notenames
+
        * stafftypes: voice names/ instrument names.
 
-       * make spanner for staffsym
-       
-       * Lookup::tex_glissando, Lookup::tex_bracket,
-       Lookup::tex_cresc, Lookup::tex_decresc (use texbeam.cc as an
+       * Lookup::tex_glissando, Lookup::tex_bracket,  (use texbeam.cc as an
        example.)
 
        * Decent TeX titledefs (\tempo, \metron, etc. )
@@ -64,11 +63,12 @@ DOC
 
        * beam generation.
 
-
        * all errors
 
 FUTURE
 
+       * warning: beam(): Beam too narrow: beam gen not per stem
+
        * put scripts on barcommands 
 
        * glissando
@@ -95,9 +95,6 @@ IDEAS
 
        * itemcolumns
 
-       * dependencies: -> implement children more elegantly. Handle
-       spanner with broken deps.
-
        * use an embedded language: scheme, lisp, S-lang, Perl, ?
 
        * y -dims in internote?
@@ -113,7 +110,7 @@ IDEAS
 
        * Spacing_request for manually adjusting spacing
 
-       * Staff_group.
+       * Staff_group, Score_request_register.
 
        * SHIT: meters/bars should be aligned, which is difficult if
        we get different keychanges in different staffs.
@@ -123,3 +120,5 @@ IDEAS
        * MusixTeX output possible?
 
        * PostScript output (esp. Beams, Slurs, etc)
+
+       * caching breakpoints
\ No newline at end of file
index f0e4716432acffd22637aa3c0f6f63a4d105a506..8868bbfd6def48ba8c9d492a66c5950b73eb962a 100644 (file)
@@ -12,7 +12,7 @@
 struct Directional_spanner : Spanner{
     
     /// -1 below heads, +1 above heads.
-    int dir;
+    int dir_i_;
 
     /// offset of "center" relative to left-column/0-pos of staff
     virtual Offset center() const=0;
index c9524ba6f5311a7071a74ff57ca8e563e27a2eb5..c3e6a93c7619701a678908b7179dd5b5cbe39eff 100644 (file)
 struct Slur : Directional_spanner {
 
     Array<Notehead*> encompass;
-    //int dir;
 
-    bool open_left,open_right;                 
+    bool open_left, open_right;                        
 
-    /****************/
+    /* *************** */
     Offset center() const;
     Slur();
     void do_post_processing();
diff --git a/hdr/slurreg.hh b/hdr/slurreg.hh
new file mode 100644 (file)
index 0000000..701b60a
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+  slurreg.hh -- declare Slur_register
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef SLURREG_HH
+#define SLURREG_HH
+
+#include "register.hh"
+
+struct Slur_register : Request_register {
+    Array<Slur_req*> requests_arr_;
+    Array<Slur *> slur_l_stack_;
+    Array<Slur*> end_slur_l_arr_;
+    int dir_i_;
+    /* *************** */
+    ~Slur_register();
+    Slur_register(Complex_walker*);
+    virtual bool try_request(Request*);
+    virtual void process_request();
+    virtual void acknowledge_element(Staff_elem_info);
+    virtual void do_pre_move_process();
+    virtual void set_dir(int);
+};
+
+#endif // SLURREG_HH
index e87778753c854354729f73b266974c398f07572c..7c61810970ad32dbbb93c97dbcdb589ce6c4b17d 100644 (file)
@@ -77,7 +77,7 @@ symboltables {
        "||"    "\finishbar"    0pt     2pt     -8pt    8pt
        ":|"    "\repeatbar"    -4pt    0pt     -8pt    8pt
        "|:"    "\startrepeat"  0pt     4pt     -8pt    8pt
-       ":|:"   "\repeatbarstartrepeat" 0pt     8pt     -8pt    8pt
+       ":|:"   "\repeatbarstartrepeat" 0pt     16pt    -8pt    8pt
 
      }
 
@@ -101,6 +101,8 @@ symboltables {
             "linestaf" "\linestafsym{%}{%}"
             "stem"     "\stem{%}{%}"           
             "fill"     "\hbox{}"
+            "crescendo" "\crescendosym{%}"     0pt     0pt     -3pt    3pt
+            "decrescendo" "\decrescendosym{%}" 0pt     0pt     -3pt    3pt
      }
 
      "dots" = table {
index 02e3d3d94fd1f74d73962ec25d9418f5c547873f..f31a15d0172330f30a79cd402475d59556f8ef43 100644 (file)
@@ -21,7 +21,6 @@ struct Stem_info {
     Real miny;
     int no_beams;
 
-    ///////////////
     
     Stem_info(){}
     Stem_info(const Stem*);
@@ -37,7 +36,7 @@ Stem_info::Stem_info(const Stem*s)
 
 }
 
-/****************/
+/* *************** */
 
 Offset
 Beam::center()const
@@ -45,7 +44,7 @@ Beam::center()const
     assert(status >= POSTCALCED);
 
     Real w=(paper()->note_width() + width().length())/2.0;
-    return Offset(w, (left_pos + w* slope)*paper()->interline());
+    return Offset(w, (left_pos + w* slope)*paper()->internote());
 }
 
 
@@ -53,7 +52,6 @@ Beam::Beam()
 {
     slope = 0;
     left_pos = 0.0;
-    dir =0;
 }
 
 void
@@ -73,9 +71,9 @@ Beam::set_default_dir()
        int d = i->get_default_dir();
        dirs[(d+1)/2] ++;
     }
-    dir =  (dirs[0] > dirs[1]) ? -1 : 1;
+    dir_i_ =  (dirs[0] > dirs[1]) ? -1 : 1;
     for (iter_top(stems,i); i.ok(); i++) {
-       i->dir = dir;
+       i->dir = dir_i_;
     }
 }
 
@@ -108,12 +106,12 @@ Beam::solve_slope()
            dy = my -y; 
     }
     left_pos += dy;
-    left_pos *= dir;    
-    slope *= dir;
+    left_pos *= dir_i_;    
+    slope *= dir_i_;
 
                                // URG
     Real sl = slope*paper()->internote();
-    paper()->lookup_p_->beam(sl, convert_dimen(20,"pt"));
+    paper()->lookup_p_->beam(sl, 20 PT);
     slope = sl /paper()->internote();
 }
 
@@ -184,7 +182,7 @@ Beam::do_pre_processing()
     left  = (*stems.top())   ->pcol_l_;
     right = (*stems.bottom())->pcol_l_;    
     assert(stems.size()>1);
-    if (!dir)
+    if (!dir_i_)
        set_default_dir();
 
 }
@@ -209,7 +207,7 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const
     Real dy=paper()->internote()*2;
     Real stemdx = paper()->rule_thickness();
     Real sl = slope*paper()->internote();
-    paper()->lookup_p_->beam(sl, convert_dimen(20,"pt"));
+    paper()->lookup_p_->beam(sl, 20 PT);
 
     Molecule leftbeams;
     Molecule rightbeams;
@@ -223,7 +221,7 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const
        a.translate(Offset (-w, -w * sl));
        for (int j = 0; j  < lhalfs; j++) {
            Atom b(a);
-           b.translate(Offset(0, -dir * dy * (lwholebeams+j)));
+           b.translate(Offset(0, -dir_i_ * dy * (lwholebeams+j)));
            leftbeams.add( b );
        }
     }
@@ -238,7 +236,7 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const
        int j = 0;
        for (; j  < rwholebeams; j++) {
            Atom b(a);
-           b.translate(Offset(0, -dir * dy * j));
+           b.translate(Offset(0, -dir_i_ * dy * j));
            rightbeams.add( b ); 
        }
        w /= 4;
@@ -246,7 +244,7 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const
        
        for (; j  < rwholebeams + rhalfs; j++) {
            Atom b(a);
-           b.translate(Offset(0, -dir * dy * j));
+           b.translate(Offset(0, -dir_i_ * dy * j));
            rightbeams.add(b ); 
        }
        
index 49bb67d7252b2d195136c219b2dc1690cebd5d0b..e7ce9c7ddc5714727d5d5fc4f8298c53dfb8ffeb 100644 (file)
@@ -2,5 +2,5 @@
 
 Directional_spanner::Directional_spanner()
 {
-    dir = 0;
+    dir_i_ = 0;
 }
index 021b81fbbbb52ac9a2aebbcf770d79971e833cba..b6d90cbef4a5fd61b195e5881dc8091b229db46f 100644 (file)
@@ -3,6 +3,7 @@
 #include "textspanner.hh"
 #include "textdef.hh"
 #include "debug.hh"
+#include "paper.hh"
 
 NAME_METHOD(Text_spanner);
 
@@ -29,20 +30,20 @@ Text_spanner::do_post_processing()
 {
     switch(spec.align_i_) {
     case 0:
-       tpos = support->center();
+       text_off_ = support->center() +
+           Offset(0,support->dir_i_ * paper()->internote() * 4); // todo
        break;
     default:
        assert(false);
        break;
-    }
-    
-    
+    }    
 }
+
 Molecule*
 Text_spanner::brew_molecule_p() const
 {
     Atom tsym (spec.create_atom(paper()));
-    tsym.translate(tpos);
+    tsym.translate(text_off_);
 
     Molecule*output = new Molecule;
     output->add( tsym );