]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.1.64.lu1
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 21 Jul 1999 13:01:33 +0000 (15:01 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 21 Jul 1999 13:01:33 +0000 (15:01 +0200)
pl 63.lu2
- very tight: hinterfleisch -> 0 : input/bugs/spacing-very-tight.ly
- bfs: neutral beam and tie directions (daar was ik al bang voor:-)
- bf: abe: may beam over skip, as long as note present too
- bf: scsii-prelude: added slurs using skips

13 files changed:
Documentation/BLURB.in
Documentation/tex/lilypond-regtest.doc
NEWS
TODO
VERSION
debian/control
input/bugs/spacing-very-tight.ly [new file with mode: 0644]
input/test/stem-direction-down.ly [new file with mode: 0644]
lily/auto-beam-engraver.cc
lily/beam.cc
lily/include/stem.hh
lily/tie.cc
mutopia/J.S.Bach/Solo-Cello-Suites/prelude-urtext.ly

index 0d7df0a9d9c64680f0649bf5bba31dd3f211ef49..591817db351a0dfd178a570ea21671b17bcce640 100644 (file)
@@ -1,5 +1,5 @@
 LilyPond is a music typesetter.  It produces beautiful sheet music
-using a high level description file as input.  It is part of the GNU
-project.
+using a high level description file as input.  LilyPond is part of 
+the GNU Project.
 
 
index 74ca05df7a4879cfec510d376d983d3d7a34058c..b2c728229357cd1c169030cbd0b3c23f534dde27 100644 (file)
@@ -59,6 +59,10 @@ notes, and up for low notes.
 
 \mudelafile{stem-direction.sly}
 
+Similarly, if \verb+stem_default_neutral_direction+ is set to \verb+-1+.
+
+\mudelafile{stem-direction-down.ly}
+
 \section{Grace notes}
 
 Grace notes are typeset as an encapsulated piece of music. You can
diff --git a/NEWS b/NEWS
index 8936143ef0f9d423fa117e8a18f22fd50067469f..6c462b6903145f38ec198a132aad6524c7df7cd9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+pl 63.lu2
+       - very tight: hinterfleisch -> 0 : input/bugs/spacing-very-tight.ly
+       - bfs: neutral beam and tie directions (daar was ik al bang voor:-)
+       - bf: abe: may beam over skip, as long as note present too
+       - bf: scsii-prelude: added slurs using skips
+
 pl 63.uu1
        - mutopia updates  courtesy Peter Chubb
        - Don't make Time_scaled_music for c4*2/3 entry, only do the
diff --git a/TODO b/TODO
index a0dde3ec7999d931e157d06e8e25e526de231bc5..1474b91bf6874441c6768834b87038a6aec54ca3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -14,7 +14,6 @@ Grep for TODO and ugh/ugr/urg.
 . * warning if feta-nummer.tfm not found
 . * broken examples:
 input/star-spangled-banner.ly: hw?
-mutopia/J.S.Bach/Solo-Cello-Suites/prelude-cello.ly: hw: slurs + autobeamer ?
 mutopia/Coriolan/*
 . * spacing of accidentals
 . * key restorations & repeats
diff --git a/VERSION b/VERSION
index c87048392c877e82918079870e623537c2305516..62eb6c8658f75c6effb804c5055dd616ef9093e6 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
 PATCH_LEVEL=64
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=lu1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 597acece90ec21edce6a068a424dab7367723d17..183e068afcc53e6a4fbf2d5426285021c71fcccd 100644 (file)
@@ -11,8 +11,8 @@ Recommends: python-base (>= 1.5.1), python-misc (>= 1.5.1), tetex-base (>= 0.9.9
 Conflicts: musixtex-fonts, tetex-base (<< 0.9)
 Description: The GNU Project music typesetter.
  LilyPond is a music typesetter.  It produces beautiful sheet music
- using a high level description file as input.  It is part of the GNU
project.
+ using a high level description file as input.  LilyPond is part of 
the GNU Project.
  
  
  .
diff --git a/input/bugs/spacing-very-tight.ly b/input/bugs/spacing-very-tight.ly
new file mode 100644 (file)
index 0000000..c903f74
--- /dev/null
@@ -0,0 +1,11 @@
+% when tightly spaced, hinterfleisch -> 0 (and not: -> note-width)
+% we need a mininum of about a note-width/interline space before
+% bar line
+
+% set rediculously tight
+\score {
+       \notes { \time 2/2; c'2 c'2 \time 2/2; }
+       \paper { linewidth = 2.0 \cm;
+       indent = 0.0;
+       }
+}
diff --git a/input/test/stem-direction-down.ly b/input/test/stem-direction-down.ly
new file mode 100644 (file)
index 0000000..3834e27
--- /dev/null
@@ -0,0 +1,8 @@
+\score{
+       \notes\relative c{
+               \include "stem-direction.sly";
+       }
+       \paper{
+               stem_default_neutral_direction=-1.0;
+       }
+}
index 672da02f63f3839829006488cdae01dca6ce08dc..87165d732ded1a383c765550fe8ee8f389903464 100644 (file)
@@ -37,18 +37,8 @@ Auto_beam_engraver::do_creation_processing ()
 }
 
 bool
-Auto_beam_engraver::do_try_music (Music* m
+Auto_beam_engraver::do_try_music (Music*) 
 {
-  /*
-    Mag dit?  Nu word-i toch maar geswallowed, en
-    komt er dus ook geen announce...
-   */
-  if (Skip_req* s = dynamic_cast <Skip_req*> (m))
-    {
-      if (stem_l_arr_p_)
-       end_beam ();
-      return true;
-    }
   return false;
 } 
 
@@ -248,6 +238,17 @@ Auto_beam_engraver::typeset_beam ()
 void
 Auto_beam_engraver::do_post_move_processing ()
 {
+  /*
+    don't beam over skips
+   */
+  if (stem_l_arr_p_)
+    {
+      Moment now = now_mom ();
+      if (extend_mom_ < now)
+       {
+         end_beam ();
+       }
+    }
 }
 
 void
@@ -305,30 +306,15 @@ Auto_beam_engraver::acknowledge_element (Score_element_info info)
          return;
        }
       
-#if 0
       /*
-       Don't (start) auto-beam over empty stems.
-       ugly check for rests!
-       --> doesn't even work: stem-dir is not set
-
-       ../flower/include/drul-array.hh:26: Real & Drul_array<double>::elem<Real>(enum Direction): Assertion `d==1 || d== -1' failed.
-/home/fred/root/usr/scripts/src/out/Linux/li: line 8: 14641 Aborted                 (core dumped) lilypond $opts
-
-      */
-      if (stem_l->extent (Y_AXIS).empty_b ())
-       {
-         if (stem_l_arr_p_)
-           end_beam ();
-         return;
-       }
-#else
+       Don't (start) auto-beam over empty stems; skips or rests
+       */
       if (!stem_l->head_l_arr_.size ())
        {
          if (stem_l_arr_p_)
            end_beam ();
          return;
        }
-#endif
 
       if (stem_l->beam_l_)
        {
@@ -337,11 +323,6 @@ Auto_beam_engraver::acknowledge_element (Score_element_info info)
          return ;
        }
              
-      /*
-       now that we have last_add_mom_, perhaps we can (should) do away
-       with these individual junk_beams
-      */
-      
       int durlog  =rhythmic_req->duration_.durlog_i_;
       if (durlog <= 2)
        {
@@ -371,7 +352,8 @@ Auto_beam_engraver::acknowledge_element (Score_element_info info)
        }
       Moment now = now_mom ();
       
-      grouping_p_->add_stem (now - beam_start_moment_ + beam_start_location_, durlog - 2);
+      grouping_p_->add_stem (now - beam_start_moment_ + beam_start_location_,
+                            durlog - 2);
       stem_l_arr_p_->push (stem_l);
       last_add_mom_ = now;
       extend_mom_ = extend_mom_ >? now + rhythmic_req->length_mom ();
index 43975b65dc62e8c2ff64296ac93b6e2ca71232b4..199117ac07900880355a84f2e95c52873e6fc983 100644 (file)
@@ -170,7 +170,6 @@ Beam::get_default_dir () const
   count[UP]  = count[DOWN] = 0;
   Direction d = DOWN;
 
-  Direction beamdir;
   for (int i=0; i <stems_.size (); i++)
     do {
       Stem *s = stems_[i];
@@ -198,28 +197,38 @@ Beam::get_default_dir () const
      If dir is not determined: up (see stem::get_default_dir ())
   */
 
+  Direction beam_dir;
+  Direction neutral_dir = (int)paper_l ()->get_var ("stem_default_neutral_direction");
+
   Dir_algorithm a = (Dir_algorithm)rint(paper_l ()->get_var ("beam_dir_algorithm"));
   switch (a)
     {
     case MAJORITY:
-      beamdir = (count[UP] >= count[DOWN]) ? UP : DOWN;
+      beam_dir = (count[UP] == count[DOWN]) ? neutral_dir 
+        : (count[UP] > count[DOWN]) ? UP : DOWN;
       break;
     case MEAN:
       // mean center distance
-      beamdir = (total[UP] >= total[DOWN]) ? UP : DOWN;
+      beam_dir = (total[UP] == total[DOWN]) ? neutral_dir
+        : (total[UP] > total[DOWN]) ? UP : DOWN;
       break;
     default:
     case MEDIAN:
       // median center distance
-      if (!count[DOWN])
-       beamdir = UP;
-      if (!count[UP])
-       beamdir = DOWN;
+      if (!count[DOWN] || !count[UP])
+        {
+         beam_dir = (count[UP] == count[DOWN]) ? neutral_dir 
+           : (count[UP] > count[DOWN]) ? UP : DOWN;
+       }
       else
-       beamdir = (total[UP] / count[UP] >= total[DOWN] / count[DOWN]) ? UP : DOWN;
+        {
+         beam_dir = (total[UP] / count[UP] == total[DOWN] / count[DOWN]) 
+           ? neutral_dir 
+             : (total[UP] / count[UP] > total[DOWN] / count[DOWN]) ? UP : DOWN;
+       }
       break;
     }
-  return beamdir;
+  return beam_dir;
 }
 
 void
index 4a59ac6911a46e5bec3ce11877b39fe912577287..14fe13c22a3686c2a04bd73da93c94e7a1caf7d5 100644 (file)
@@ -48,11 +48,10 @@ class Stem : public Item, public Staff_symbol_referencer {
     */
   Drul_array<Real> yextent_drul_;
 
-public:  // urg, autobeamer needs to know if there are (only) rests here?
+public:
   Link_array<Note_head> head_l_arr_;
   Link_array<Rest> rest_l_arr_;
     
-public:
   /// log of the duration. Eg. 4 -> 16th note -> 2 flags
   int flag_i_;
 
index e6c1902d778a42d470edcca27b166a10380f35f4..1bd0d1cdee2e5d8007ca83c56106ac58bb9c4a96 100644 (file)
@@ -39,11 +39,13 @@ Tie::get_default_dir () const
 {
   int m = (head_l_drul_[LEFT]->position_i_ 
          + head_l_drul_[RIGHT]->position_i_) /2;
+
   /*
     If dir is not determined: inverse of stem: down
     (see stem::get_default_dir ())
    */
-  return (m <= 0)? DOWN : UP;
+  Direction neutral_dir = (int)paper_l ()->get_var ("stem_default_neutral_direction");
+  return (m == 0) ? other_dir (neutral_dir) : (m < 0) ? DOWN : UP;
 }
 
 void
index 7f9b4df710eebaca0276d24a82ab608ea23b67ab..dbc6e7b2d8d9b1f5822929a32c59533cf8c1d900 100644 (file)
@@ -186,8 +186,7 @@ prelude_slurs = \notes{
 
 prelude_a = \notes<
        \$prelude_notes
-       % Han-Wen: help:  adding slurs breaks auto-beaming??
-       %\$prelude_slurs
+       \$prelude_slurs
 >
 
 prelude = \context Staff \notes<