]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/beam-quanting-horizontal.ly: update texidoc
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 15 Jun 2003 18:52:31 +0000 (18:52 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 15 Jun 2003 18:52:31 +0000 (18:52 +0000)
* scm/define-grobs.scm (all-grob-descriptions): set
beamed-extreme-minimum-free-lengths to 1.25 for 32nd beams.
This fixes 32nd beams for noteheads in spaces quants.

ChangeLog
Documentation/user/introduction.itely
input/regression/beam-quanting-horizontal.ly
input/test/trills.ly
input/test/volta.ly
lily/beam-quanting.cc
lily/include/beam.hh
lily/stem.cc
scm/define-grobs.scm

index 9bf7b85e5830f00ba6fac1be3c1eff45886fdc6f..f8c6c5a166fe2b573e4a7ce3ac99939e7bcde43a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2003-06-15  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * input/regression/beam-quanting-horizontal.ly: update texidoc
+
+       * scm/define-grobs.scm (all-grob-descriptions): set
+       beamed-extreme-minimum-free-lengths to 1.25 for 32nd beams.
+       This fixes 32nd beams for noteheads in spaces quants.
+
        * scripts/lilypond-book.py (process_lilypond_blocks): opps.
 
 2003-06-15  Heikki Junes  <hjunes@cc.hut.fi>
index 5239df22a0de76633b1c138c757bb88e6a2fc04d..4d5e5600fb385b09f30851922607693bee7762c9 100644 (file)
@@ -11,8 +11,9 @@ is produced without any further intervention.  For example, something
 like this:
 
 
-@c newlines in intertext choke on lilypond.org? 
-@lilypond[fragment,verbatim, relative 1, intertext="produces this:"]
+@lilypond[fragment,verbatim, relative 1, intertext="produces this:
+
+"]
 \key c \minor r8 c16 b c8 g as c16 b c8 d | g,4
 @end lilypond
 
index 4959a5095d0cc8ebb0c8558da480f5d0889e1b89..957d56926da1dad0aaf0a82d433b8de3fe3e5ede 100644 (file)
@@ -1,7 +1,11 @@
 \version "1.7.18"
 
 \header{
-texidoc =       "Test beam quant positions for horizontal beams."
+
+    texidoc = "Test beam quant positions for horizontal beams.  Staff
+lines should be covered in all cases. For 32nd beams, the free stem
+lengths are between 2 and 1.5."
+
 }
 
 \score{
@@ -10,11 +14,13 @@ texidoc =    "Test beam quant positions for horizontal beams."
                 a,-[ a]  c-[ c]
                 d,8-[ d]  g'-[ g]
                 g,-[ g]  d'-[ d]
-                c,16-[ c c c]  a''-[ a a a]
-                a,-[ a a a]  c-[ c c c]
+                c,16-[ c]  a''-[ a]
+                a,-[ a ]  c-[ c]
                \break
-                c,32-[ c c c c c c c]  a''-[ a a a a a a a]
-                f,-[ f f f f f f f]  e'-[ e e e e e e e]
+                c,32-[  c]  a''-[ a]
+                f,-[ f]  e'-[ e]
+                c,64-[ c]  a''-[ a]
+                f,-[ f]  e'-[ e]
                \break
        }
 }
index a88400fa6d833ce53b57cfd69ea16d156cab7f06..c535dee669514fbd46bac7073a2a8454370a5946 100644 (file)
@@ -32,7 +32,6 @@ endHorizScript = {
 
 \score {
   <
-    \property Score.TimeSignature = \turnOff
     \context GrandStaff <
       \context Staff=upper \notes\relative c'' {
        \time 1/4
index 406adcce9fe2f3cbf74dbceb1d320365a8899b01..7de0d01f6838d3949e2b70b0e4a79862f7373ee9 100644 (file)
@@ -9,7 +9,6 @@ voiceE =  \notes {
 \clef bass
  \property Staff.instrument = "Bass"
  \property Staff.instr = "B"
-% \property Staff.VoltaBracket = \turnOff
 
  \time 4/4  f,2 (    f,8-)    r8   f8    e8    
 \repeat  volta 2
index 45fb5e5c9343d29f61ef5f693983d58fefe81ceb..04ee4217cea944cceed7eefe84b81d7c734529bf 100644 (file)
@@ -221,7 +221,7 @@ Beam::quanting (SCM smob)
                                     beam_count, ldir, rdir); 
       }
 
-  ; /* silly gdb thinks best_idx is inside for loop. */
+  //  ; /* silly gdb thinks best_idx is inside for loop. */
   for (int i = qscores.size (); i--;)
     if (qscores[i].demerits < reasonable_score)
       {
@@ -233,7 +233,7 @@ Beam::quanting (SCM smob)
                                 qscores[i].yl, qscores[i].yr);
       }
 
-  ; /* silly gdb thinks best_idx is inside for loop. */
+  //  ; /* silly gdb thinks best_idx is inside for loop. */
   int best_idx = best_quant_score_idx (qscores);
   me->set_grob_property ("positions",
                         gh_cons (gh_double2scm (qscores[best_idx].yl),
@@ -252,10 +252,10 @@ Beam::quanting (SCM smob)
 }
 
 Real
-Beam::score_stem_lengths (Link_array<Grob>stems,
-                         Array<Stem_info> stem_infos,
-                         Array<Real> base_stem_ys,
-                         Array<Real> stem_xs,
+Beam::score_stem_lengths (Link_array<Grob> const &stems,
+                         Array<Stem_info> const &stem_infos,
+                         Array<Real> const &base_stem_ys,
+                         Array<Real> const &stem_xs,
                          Real xl, Real xr, 
                          bool knee, 
                          Real yl, Real yr)
@@ -294,11 +294,14 @@ Beam::score_stem_lengths (Link_array<Grob>stems,
 
       count[d] ++;
     }
-  
-  if(count[LEFT])
-    score[LEFT] /= count[LEFT];
-  if(count[RIGHT])
-    score[RIGHT] /= count[RIGHT];
+
+  Direction d = DOWN;
+  do
+    { 
+      if(count[d])
+       score[d] /= count[d];
+    }
+  while (flip (&d) != DOWN);
 
   return score[LEFT]+score[RIGHT];
 }
index c2be8243a3133e832e83deb6e25d568aaea2dc57..a9e04426a91b9bdb766267d135a016b700adb702 100644 (file)
@@ -46,10 +46,14 @@ public:
   DECLARE_SCHEME_CALLBACK (shift_region_to_valid, (SCM));  
   DECLARE_SCHEME_CALLBACK (quanting, (SCM));
   static Real score_slopes_dy (Real, Real, Real, Real, bool);
-  static Real score_stem_lengths (Link_array<Grob>,
-                                 Array<Stem_info>,
-                                 Array<Real>, Array<Real>,
-                                 Real, Real, bool, Real, Real);
+
+  static Real score_stem_lengths (Link_array<Grob> const &stems,
+                                 Array<Stem_info> const &stem_infos,
+                                 Array<Real> const &base_stem_ys,
+                                 Array<Real> const &stem_xs,
+                                 Real xl, Real xr, 
+                                 bool knee, 
+                                 Real yl, Real yr);
   static Real score_forbidden_quants (Real, Real,
                                      Real, Real, Real, Real,
                                      int, Direction, Direction);
index 51c2c5853034934a9500871eacca3304a34756d1..efbdcd1b774dcb21cf6994c19c035a003863b8a2 100644 (file)
@@ -834,20 +834,18 @@ Stem::calc_stem_info (Grob *me)
 
 
   /* Simple standard stem length */
+  SCM lengths = me->get_grob_property ("beamed-lengths");
   Real ideal_length =
-    gh_scm2double (robust_list_ref
-                  (beam_count - 1,
-                   me->get_grob_property ("beamed-lengths")))
+    gh_scm2double (robust_list_ref (beam_count - 1,lengths))
+               
     * staff_space
     /* stem only extends to center of beam */
     - 0.5 * beam_thickness;
-
   
   /* Condition: sane minimum free stem length (chord to beams) */
+  lengths = me->get_grob_property ("beamed-minimum-free-lengths");
   Real ideal_minimum_free =
-    gh_scm2double (robust_list_ref
-                  (beam_count - 1,
-                   me->get_grob_property ("beamed-minimum-free-lengths")))
+    gh_scm2double (robust_list_ref (beam_count - 1, lengths))
     * staff_space;
   
 
index c4981cb439974fc0f2c5795bb3fa79b54f2190a5..e2e527b4e5d7313ba82789884eb4684cd52f522e 100644 (file)
        ;; looking at Baerenreiter examples) for a number of common
        ;; boundary cases.  Subtracting half a beam thickness fixes
        ;; this, but the bug may well be somewhere else.
-       (beamed-lengths . (3.26))
-
+       (beamed-lengths . (3.26 3.26 1.5))
+       
        ;; [Wanske] lists three sets of minimum lengths.  One
        ;; set for the nomal case, and one set for beams with `der
        ;; Balkenendpunkt weiter "uber bzw. unter die Systemgrenze
        ;; and the extreme minima as abolute minimum length.
        
        ;; The 'normal' minima
-       (beamed-minimum-free-lengths . (2.5 2.0 1.5))
-       
-       ;; The 'far outside staff' minima, not used
-       ;(beamed-far-minimum-free-lengths . (1.83))
+       (beamed-minimum-free-lengths . (2.5 2.0 1.0))
        
        ;; The 'extreme case' minima
-       (beamed-extreme-minimum-free-lengths . (1.83 1.5))
+       (beamed-extreme-minimum-free-lengths . (1.83 1.5 1.25))
 
        (X-offset-callbacks . (,Stem::off_callback))
        (X-extent-callback . ,Stem::dim_callback)