]> git.donarmstrong.com Git - lilypond.git/commitdiff
ChangeLog
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 3 May 2002 23:09:08 +0000 (23:09 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 3 May 2002 23:09:08 +0000 (23:09 +0000)
ChangeLog
input/regression/beam-concave.ly
lily/beam.cc
mf/feta-nummer-code.mf
scm/grob-description.scm

index c779f3008208c0b71d230c2fd48ff491d6295c45..3ee20538c773b5680411151b467d849d5f892d2a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-05-04  Han-Wen  <hanwen@cs.uu.nl>
+
+       * lily/beam.cc (check_concave): allow undefined gap and
+       threshold. Change the meaning of threshold/gap == 0.0.
+       (check_concave): skip Stolba concaveness check if we have a knee
+       on outer stems.
+
 2002-05-03  Han-Wen  <hanwen@cs.uu.nl>
 
        * mf/feta-klef.mf: more twiddling with G clef. Almost straight
index ac8b48e492bbc0c7d0788bb004973ca8f00e4b21..098a9ddf92d13fdc9aadb57378905ced10250821 100644 (file)
@@ -1,18 +1,27 @@
 \header{
-  texidoc = "Concave beams should be horizontal.  However, what exactly
+
+texidoc = "Concave beams should be horizontal. informally spoken,
+  concave refers to the shape of the notes that are opposite a
+  beam. If an up-beam has high notes on its center stems, then we call
+  it concave.  In this example, only the beams that are marked `horiz'
+  are considered concave by lily. They should be printed horizontally.
+  "
+}
+
+
+%{
+ However, what exactly
 it is that makes a beam concave is still unclear.
 
 Beams 1 and 3 should be sloped, 2 and 4 should be horizontal.  Two
 sane attempts of calculating concaveness of a beam fail to distinguish
 beams this way."
+%}
 
-}
 
 \score{
   \notes\relative c'{
-    \property Voice.Beam \set #'concaveness-threshold = #0.08
-    \property Voice.Beam \set #'concaveness-bt2 = #2.0
-    
+
 %% This case seems easy: second beam should be horizontal.
     
     %% SCS-I Menuet I, m15
@@ -57,8 +66,13 @@ beams this way."
 %     [g, e' cis]
 
     
-%%% `Han-Wen': this should be concave
+%%% Han-Wen: this should be concave
     [a,16^"horiz." a' a a]
+
+    \clef treble
+
+%%%% This should not be concave (hwn)
+    [\stemUp bes8  \stemDown d'8 bes8]  
   }
   \paper{
     linewidth = -1.0
index 57ff7ff3f83d058783df5f3db9267f0ff96ecc8f..7224333bcad65dc5db08c680bc71207a3a3d842c 100644 (file)
@@ -796,16 +796,28 @@ Beam::check_concave (SCM smob)
   if (stems.size () < 3)
     return SCM_UNSPECIFIED;
 
-  Direction dir = Directional_element_interface::get (me);
+
   /* Concaveness #1: If distance of an inner notehead to line between
      two outer noteheads is bigger than CONCAVENESS-GAP (2.0ss),
-     beam is concave (Heinz Stolba). */
+     beam is concave (Heinz Stolba).
+
+     In the case of knees, the line connecting outer heads is often
+     not related to the beam slope (it may even go in the other
+     direction). Skip the check when the outer stems point in
+     different directions. --hwn
+     
+  */
   bool concaveness1 = false;
-  Real r1 = gh_scm2double (me->get_grob_property ("concaveness-gap"));
-  if (r1 > 0)
+  SCM gap = me->get_grob_property ("concaveness-gap");
+  if (gh_number_p (gap)
+      && Stem::get_direction(stems.top ())
+         == Stem::get_direction(stems[0]))
     {
+      Real r1 = gh_scm2double (gap);
       Real dy = Stem::chord_start_f (stems.top ())
        - Stem::chord_start_f (stems[0]);
+
+      
       Real slope = dy / (stems.size () - 1);
       
       Real y0 = Stem::chord_start_f (stems[0]);
@@ -824,9 +836,14 @@ Beam::check_concave (SCM smob)
   /* Concaveness #2: Sum distances of inner noteheads that fall
      outside the interval of the two outer noteheads */
   Real concaveness2 = 0;
-  Real r2 = gh_scm2double (me->get_grob_property ("concaveness-threshold"));
-  if (!concaveness1 && r2 > 0)
+  SCM thresh = me->get_grob_property ("concaveness-threshold");
+  Real r2 = infinity_f;
+  if (!concaveness1 && gh_number_p (thresh))
     {
+      r2 = gh_scm2double (thresh);
+      
+      Direction dir = Directional_element_interface::get (me);  
+
       Real concave = 0;
       Interval iv (Stem::chord_start_f (stems[0]),
                   Stem::chord_start_f (stems.top ()));
@@ -843,7 +860,10 @@ Beam::check_concave (SCM smob)
          else if ((c = f - iv[MIN]) < 0)
            concave += c;
        }
-      
+      /*
+       Ugh. This will mess up with knees. Direction should be
+       determined per stem.
+       */
       concave *= dir;
 
       concaveness2 = concave / (stems.size () - 2);
index 3d7eb8d26e34516bd0e7870be5f3dd95a8ac98ca..28bd3b7a0d60e5b3225a005194edf8f69d69e596 100644 (file)
@@ -324,12 +324,13 @@ fet_beginchar("Numeral 3", "3", "three")
        penpos1(hair,-90);
 
 %      flare_start = 0.25 ;
-       x1l = 35/80 w;
+       x1l = 36/80 w;
        y1l = h;
        
 %      z1l=(17/16thick,h);
        penpos2(7/8thick,180);
-       z2l=(w-thick/8,3/4h+thick/16);
+       x2l= w-thick/8;
+       y2l = 3/4h + thick*  3/32; 
        penpos3(thin,90);
        z3=(w/2,h/2+1/8thick);
        penpos4(thin,90);
index afb13ffdedb9b08572b61685c9627b8a0c071e3e..da2ec6f5576764c21d330a81d5b5a168b49e053b 100644 (file)
@@ -35,8 +35,8 @@
     (AccidentalPlacement
      . (
        (X-extent-callback . ,Accidental_placement::extent_callback)
-       (left-padding . 0.2)
-       (right-padding . 0.5)
+       (left-padding . 0.3)
+       (right-padding . 0.3)
        (meta . ((interfaces . (accidental-placement-interface))))
        ))
 
      . (
        ;; don't set direction here: it breaks staccato.
        (molecule-callback . ,Script::brew_molecule)
-       (padding . 0.29) 
+
+       ;; This value is sensitive: if too large, staccato dots will move a
+       ;; space a away.
+       (padding . 0.25) 
        (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
        (before-line-breaking-callback . ,Script::before_line_breaking)
        (font-family . music)