]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/test/stem.ly:
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 13 Aug 2002 12:51:02 +0000 (12:51 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 13 Aug 2002 12:51:02 +0000 (12:51 +0000)
* input/mutopia/J.S.Bach/baerenreiter-sarabande.ly: Play with
beamed-lengths.

* input/test/spacing.ly: Give enough room to test spacing.

ChangeLog
input/les-nereides.ly
input/mutopia/J.S.Bach/baerenreiter-sarabande.ly
input/test/spacing.ly
input/test/stem.ly
lily/beam-quanting.cc
lily/beam.cc

index 1967206c699a74c944432590734a2e7964e6f40b..ed31b8b21e943fe41dfa6118eae0b2ca1d5189c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2002-08-13  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * input/test/stem.ly:
+       * input/mutopia/J.S.Bach/baerenreiter-sarabande.ly: Play with
+       beamed-lengths.
+
+       * input/test/spacing.ly: Give enough room to test spacing.
+
        * cygwin/post-lilypond.sh: Fix and update.
 
        * cygwin/zlily-profile.sh: Remove.
index 6b2ba4bf5b97fe6d1f446e8436d7ab1a1690b272..63ac72d4461fccc3f3ef1588d68a97189e451a3d 100644 (file)
@@ -351,3 +351,7 @@ lowerDynamics =  \context Dynamics=lower \notes{
         }
     }
 }
+
+%%% Local variables:
+%%% LilyPond-indent-level:4
+%%% End:
index 37b8d8a7686983c9745a71cbb853b329d11baf71..2f00f25f85c612c13a3b88e0dcbf294949333d16 100644 (file)
@@ -1,4 +1,4 @@
-
+\version "1.5.68"
 
 #(set! point-and-click line-column-location)
 
@@ -49,9 +49,6 @@ half way in measure 13 has been forgotten.
 }
 
 
-\version "1.5.68"
-
-
 sarabandeA =  \context Voice \notes \relative c {
   \property Staff.NoteCollision \set #'merge-differently-dotted = ##t
   < { d8. e16 e4.-\trill d16 e } \\
@@ -140,8 +137,6 @@ sarabande =  \context Staff \notes<
   
 >
 
-\version "1.5.68"
-
 sarabandeCelloGlobal =  \notes{
   \time 3/4
   \key f \major
@@ -156,7 +151,12 @@ sarabandeCelloGlobal =  \notes{
 sarabandeCelloScripts =  \notes{
 }
 
+  #(warn "FIXME: Setting beamed lengths")
 sarabandeCelloStaff =  \context Staff <
+  %%#(warn "FIXME: Setting beamed lengths")
+  %%\notes c4*0-#(warn "FIXME: Setting beamed lengths")
+  \property Staff.Stem \set #'beamed-lengths = #'(3.26)
+  
   \sarabande
   \sarabandeCelloGlobal
   \sarabandeCelloScripts
index eeafb9038714528f4d2f4d95c1c34585285240fe..2f2c3512315773ba503276bfc26554c9e1c81e7d 100644 (file)
@@ -91,7 +91,7 @@ singlepart =  \notes{
        \multipart 
     }
     \paper {
-%    linewidth= 18.\cm
-
+      indent = 0.0 \cm
+      linewidth= 20.0\cm
     }
 }
index a64bc6a839fc826668f09100a15fd834c721dd7a..d2a023f242ddd2be4aa2ad958775c9c8990a9919 100644 (file)
@@ -1,45 +1,67 @@
 \version "1.5.68"
 \header{
-title= "Stems and Beams"
-subtitle =  "proofsheet" 
-enteredby =     "jcn"
-copyright =     "public domain"
-TestedFeatures =        "This file tests the length of stems and placement 
+  title= "Stems and Beams"
+  subtitle =  "proofsheet" 
+  enteredby =   "jcn"
+  copyright =   "public domain"
+  TestedFeatures =      "This file tests the length of stems and placement 
 of beams"
-       
+  
 }
 
 
 
-beamintervals =  \notes{
-               \time 7/4
-               \stemUp
-\transpose c'{
-               [ c8 d ] [ c e ] [ c f ] [ c g ] [ c a ] [ c b ] [ c c' ] |
-               [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
-               }\transpose c''{
-               [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
-               \stemDown}
-               \transpose c'''{
-               [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
-}              \transpose c''{
-               [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
-               [ c d ] [ c e ] [ c f ] [ c g ] [ c a ] [ c b ] [ c c' ] |
-       }}
+beamintervals = \notes{
+  \time 7/4
+  \stemUp
+  \transpose c''{
+    [ c8 d ] [ c e ] [ c f ] [ c g ] [ c a ] [ c b ] [ c c' ] |
+    [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
+  }
+  \transpose c'''{
+    [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
+    \stemDown
+  }
+  \transpose c''''{
+    [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
+  }
+  \transpose c'''{
+    [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
+    [ c d ] [ c e ] [ c f ] [ c g ] [ c a ] [ c b ] [ c c' ] |
+  }
+}
 
 \score{
-       \notes\transpose c'{ 
-               \stemUp
-               \time 17/4
-               g,4 a, b, c d e f g a b c' d' e' f' g' a' b' |
-               \stemDown
-               b' a' g' f' e' d' c' b a g f e d c b, a, g, |
-               \beamintervals
-               \transpose d \beamintervals
-               \transpose e \beamintervals
-               \transpose f \beamintervals
-               \transpose g \beamintervals
-               \transpose a \beamintervals
-               \transpose b \beamintervals
-       }
+  \notes{
+    \time 19/4
+
+    %% 3.50 (standard) - 0.24 (beam-thickness / 2) = 3.26 ...
+    %% yields beams almost as [Ross] wants them.
+    
+    %% Differences are only half a beam-thickness, probably giving
+    %% Lily's beams a slightly better slope
+    
+    \property Staff.Stem \set #'beamed-lengths = #'(3.26)
+
+    \relative c'{
+      \stemUp
+      g4 a b c d e f g a b c d e f g a b c d
+      \stemDown
+      d c b a g f e d c b a g f e d c b a g
+    }      
+    \beamintervals
+    \transpose d' \beamintervals
+    \transpose e' \beamintervals
+    \transpose f' \beamintervals
+    \transpose g' \beamintervals
+    \transpose a' \beamintervals
+    \transpose b' \beamintervals
+  }
+  \paper{
+    indent = 0.0\mm
+    }
 }
+
+%%% Local variables:
+%%% LilyPond-indent-level:2
+%%% End:
index e3fa99efb180b4c7e58a0256421312045ff73b18..c589e5da37fc7f65c84b4ad1702dc7ff3b792bf9 100644 (file)
@@ -1,3 +1,15 @@
+/*
+  beam-quanting.cc -- implement Beam quanting functions
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  Jan Nieuwenhuizen <janneke@gnu.org>
+  
+*/
+
+
+
 #include <math.h>
 
 #include "grob.hh"
@@ -181,13 +193,10 @@ Beam::quanting (SCM smob)
        qscores.push (qs);
       }
 
-  /*
-    This is a longish function, but we don't separate this out into
-    neat modular separate subfunctions, as the subfunctions would be
-    called for many values of YL, YR. By precomputing various
-    parameters outside of the loop, we can save a lot of time.
-  */
-
+  /* This is a longish function, but we don't separate this out into
+     neat modular separate subfunctions, as the subfunctions would be
+     called for many values of YL, YR. By precomputing various
+     parameters outside of the loop, we can save a lot of time. */
   for (int i = qscores.size (); i--;)
     {
       qscores[i].demerits
@@ -197,9 +206,7 @@ Beam::quanting (SCM smob)
 
   Real rad = Staff_symbol_referencer::staff_radius (me);
   int beam_count = get_beam_count (me);
-  Real beam_translation = beam_count < 4
-    ? (2*ss + slt - thickness) / 2.0
-     : (3*ss + slt - thickness) / 3.0;
+  Real beam_translation = get_beam_translation (me);
 
   Real reasonable_score = (knee_b) ? 200000 : 100;
   for (int i = qscores.size (); i--;)
@@ -268,18 +275,13 @@ Beam::score_stem_lengths (Link_array<Grob>stems,
       Stem_info info = stem_infos[i];
       Direction d = info.dir_;
 
-      score[d] += pen
-       * (0 >? (d * (info.shortest_y_ - current_y)));
+      score[d] += pen * (0 >? (d * (info.shortest_y_ - current_y)));
 
-      Real ideal_score = shrink_extra_weight (d * current_y  - d * info.ideal_y_);
+      Real ideal_score = shrink_extra_weight (d * (current_y - info.ideal_y_));
       
-      /*
-
-      we introduce a power, to make the scoring strictly
-      convex. Otherwise a symmetric knee beam (up/down/up/down) does
-      not have an optimum in the middle.
-       
-       */
+      /* We introduce a power, to make the scoring strictly
+         convex. Otherwise a symmetric knee beam (up/down/up/down)
+         does not have an optimum in the middle. */
       if (knee)
        ideal_score = pow (ideal_score, 1.1);
       score[d] += STEM_LENGTH_DEMERIT_FACTOR * ideal_score;
index 731dcb3e6e8c962f04c7d89e34ca35ef382170b8..3e9c31f66cb407a4c840703e93a10f0d291f6f4d 100644 (file)
@@ -11,9 +11,6 @@
 /*
 TODO:
 
-
-  * Junk stem_info.
-
   * Use Number_pair i.s.o Interval to represent (yl, yr).
   
   - Determine auto knees based on positions if it's set by the user.
@@ -70,9 +67,7 @@ Beam::add_stem (Grob *me, Grob *s)
 }
 
 
-/*
-  this returns the translation between 2 adjoining beams.
- */
+/* Return the translation between 2 adjoining beams. */
 Real
 Beam::get_beam_translation (Grob *me)
 {
@@ -1154,10 +1149,8 @@ where_are_the_whole_beams(SCM beaming)
   return l;
 }
 
-/*
-  Calculate the Y position of the stem-end, given the Y-left, Y-right
-  in POS for stem S. This Y position is relative to S.
- */
+/* Return the Y position of the stem-end, given the Y-left, Y-right
+   in POS for stem S.  This Y position is relative to S. */
 Real
 Beam::calc_stem_y (Grob *me, Grob* s, Grob ** common,
                   Real xl, Real xr,