]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.15
authorfred <fred>
Tue, 10 Dec 1996 00:45:54 +0000 (00:45 +0000)
committerfred <fred>
Tue, 10 Dec 1996 00:45:54 +0000 (00:45 +0000)
hdr/misc.hh
src/stem.cc

index 64c8ca4102c1606fb91513938c895473bbbd9d08..763ebbc250a9a7ce5c2f30851c807f0cdb8041d6 100644 (file)
@@ -2,6 +2,13 @@
 #define MISC_HH
 
 
+double log2(double x) ;
+int intlog2(int d);
+inline int
+ABS(int i)
+{
+    return (i < 0)?-i:i;
+}
 
 
 #endif
index 5fa4d9ee30920260aeca1ed1efda3d4ef0589191..84e24c598639bb1e2b8ba33f43361086fdb51a1c 100644 (file)
@@ -6,16 +6,15 @@
 #include "lookup.hh"
 #include "molecule.hh"
 #include "pcol.hh"
+#include "misc.hh"
 
 const int STEMLEN=7;
-static int
-ABS(int i) {
-    return (i < 0)?-i:i;
-}
-
 
-Stem::Stem(int c)
+Stem::Stem(int c, Real len)
 {
+    note_length = len;
+    beams_left = 0;
+    beams_right = 0;
     minnote = 1000;            // invalid values
     maxnote = -1000;
     bot = top = 0;
@@ -27,7 +26,19 @@ Stem::Stem(int c)
     stem_xoffset=0;
 }
 
+void
+Stem::print() const
+{
+#ifndef NPRINT
+    mtor << "{\n";
+    mtor << "flag "<< flag << " print_flag " << print_flag
+        << "min,max [" << minnote << ", " << maxnote << "]";
+       
 
+    Item::print();
+    mtor << "}\n";
+#endif
+}
 void
 Stem::set_stemend(Real se)
 {
@@ -49,15 +60,10 @@ Stem::add(Notehead *n)
     if ( p < minnote)
        minnote = p;
     if ( p> maxnote)
-       maxnote = p;
-}
-void
-Stem::print()const
-{
-    mtor << "Stem minmax=["<< minnote<<","<<maxnote<<"], flag: "<<flag;
-    Item::print();
+       maxnote = p;    
 }
 
+
 void
 Stem::set_default_dir()
 {