]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.64
authorfred <fred>
Sun, 24 Mar 2002 20:12:02 +0000 (20:12 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:12:02 +0000 (20:12 +0000)
Documentation/INSTALL.pod
lily/beam.cc

index 093db58f920638b2bcaf40ee91f94c8e94b0dad8..b6bdf07f28e46357fc61ad50b6bf1e4b934c0c9c 100644 (file)
@@ -98,6 +98,25 @@ most MusiXTeX preprocessors)
 
 =back
 
+=head1 WEBSITE
+
+If you want to auto-generate Lily's website, you'll need some additional
+conversion tools.
+
+=over 5
+
+=item *
+
+Xpmtoppm (from the libgr-progs package).
+
+=item *
+
+Bib2html (http://pertsserver.cs.uiuc.edu/~hull/bib2html.)
+Which, in turn depends on Man2htlm (http://askdonald.ask.uni-karlsruhe.de/
+hppd/hpux/Networking/WWW/Man2html-1.05) for proper installation (ugh).
+TeTeX users, don't forget to rerun texhash.
+
+=back
 
 =head1 CONFIGURING and COMPILING
 
index f60d230e75efc45d94d459ecec81fa94bdcff52c..142d1f7b3b6b478f80a1eaf50dfee1ee9e0f2f25 100644 (file)
@@ -204,6 +204,7 @@ Beam::solve_slope ()
 
   assert (multiple_i_);
   Array<Stem_info> sinfo;
+  DOUT << "Beam::solve_slope: \n";
   for (int j=0; j <stems_.size (); j++)
     {
       Stem *i = stems_[j];
@@ -234,8 +235,53 @@ Beam::solve_slope ()
        }
 
       l.minimise (slope_f_, left_y_);
+
+     }
+
+  solved_slope_f_ = dir_ * slope_f_;
+
+  /*
+    This neat trick is by Werner Lemberg, damped = tanh (slope_f_) corresponds
+    with some tables in [Wanske]
+    */
+  if (damping_i_)
+    slope_f_ = 0.6 * tanh (slope_f_) / damping_i_;
+
+  /* 
+    [TODO]
+    think
+
+    dropping lq for stemlengths solves [d d d] [d g d] "bug..."
+
+    but may be a bit too crude, and result in lots of 
+    too high beams...
+
+    perhaps only if slope = 0 ?
+    */
+
+//      left_y_ = sinfo[0].minyf_;
+
+  if (sinfo.size () >= 1)
+    {
+      Real staffline_f = paper ()->rule_thickness ();
+      Real epsilon_f = staffline_f / 8;
+      if (abs (slope_f_) < epsilon_f)
+       left_y_ = (sinfo[0].idealy_f_ + sinfo.top ().idealy_f_) / 2;
+      else
+       /* 
+         symmetrical, but results often in having stemlength = minimal 
+
+       left_y_ = sinfo[0].dir_ == dir_ ? sinfo[0].miny_f_ : sinfo[0].maxy_f_;
+
+         what about
+       */
+       {
+         Real dx = stems_.top ()->hpos_f () - stems_[0]->hpos_f ();
+         left_y_ = sinfo[0].idealy_f_ >? sinfo.top ().idealy_f_ - slope_f_ * dx; 
+       }
     }
 
+  // uh?
   Real dy = 0.0;
   for (int i=0; i < sinfo.size (); i++)
     {
@@ -247,15 +293,7 @@ Beam::solve_slope ()
     }
   left_y_ += dy;
   left_y_ *= dir_;
-
   slope_f_ *= dir_;
-  solved_slope_f_ = slope_f_;
-  /*
-    This neat trick is by Werner Lemberg, damped = tanh (slope_f_) corresponds
-    with some tables in [Wanske]
-    */
-  if (damping_i_)
-    slope_f_ = 0.6 * tanh (slope_f_) / damping_i_;
 
   quantise_dy ();
 }
@@ -466,10 +504,14 @@ Beam::set_stemlens ()
    */
 
   Real dx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f ();
-  Real damped_slope_dy_f = (solved_slope_f_ - slope_f_) * dx_f / 2;
-  if (abs (damped_slope_dy_f) <= epsilon_f)
+  Real damp_correct_f = paper ()->get_var ("beam_slope_damp_correct_factor");
+  Real damped_slope_dy_f = (solved_slope_f_ - slope_f_) * dx_f
+    * sign (slope_f_);
+  damped_slope_dy_f *= damp_correct_f;
+  if (damped_slope_dy_f <= epsilon_f)
     damped_slope_dy_f = 0;
 
+  DOUT << "Beam::set_stemlens: \n";
   Real x0 = stems_[0]->hpos_f ();
   Real dy_f = 0;
   // urg
@@ -503,8 +545,7 @@ Beam::set_stemlens ()
              dy_f = dy_f >? info.miny_f_ - y;
            }
        }
-      if (dy_f && damped_slope_dy_f 
-       && (sign (dy_f) == sign (damped_slope_dy_f)))
+      if (damped_slope_dy_f && (dy_f >= 0))
        dy_f += damped_slope_dy_f;
       damped_slope_dy_f = 0;
       if (abs (dy_f) <= epsilon_f)