From: fred Date: Tue, 10 Dec 1996 00:45:54 +0000 (+0000) Subject: lilypond-0.0.15 X-Git-Tag: release/1.5.59~6636 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=169a7d4a0a5bc5553e2a13afaa50c8be958d7fd8;p=lilypond.git lilypond-0.0.15 --- diff --git a/hdr/misc.hh b/hdr/misc.hh index 64c8ca4102..763ebbc250 100644 --- a/hdr/misc.hh +++ b/hdr/misc.hh @@ -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 diff --git a/src/stem.cc b/src/stem.cc index 5fa4d9ee30..84e24c5986 100644 --- a/src/stem.cc +++ b/src/stem.cc @@ -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<<","<