]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.27
authorfred <fred>
Tue, 26 Mar 2002 21:46:41 +0000 (21:46 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:46:41 +0000 (21:46 +0000)
15 files changed:
input/test/slur-mininum.ly [new file with mode: 0644]
input/test/tie-minimum.ly [new file with mode: 0644]
intl/GNUmakefile
lily/include/slur.hh
lily/include/stem.hh
lily/include/tie-engraver.hh
lily/include/tie.hh
lily/slur.cc
lily/spring-spacer.cc
lily/tie-engraver.cc
lily/tie.cc
ly/params.ly
mutopia/J.S.Bach/wtk1-fugue2.ly
stepmake/stepmake/c-targets.make
stepmake/stepmake/library-vars.make

diff --git a/input/test/slur-mininum.ly b/input/test/slur-mininum.ly
new file mode 100644 (file)
index 0000000..5144ab9
--- /dev/null
@@ -0,0 +1,11 @@
+\score{
+       \notes\relative c''{
+               \time 2/4;
+               c()c
+               c~c\break
+               }
+       \paper{
+               linewidth=-1.\mm;
+               slur_x_minimum=40.0*\interline;
+       }
+}
diff --git a/input/test/tie-minimum.ly b/input/test/tie-minimum.ly
new file mode 100644 (file)
index 0000000..676dc2a
--- /dev/null
@@ -0,0 +1,11 @@
+\score{
+       \notes\relative c''{
+               \time 2/4;
+               c~c\break
+               c()c
+               }
+       \paper{
+               linewidth=-1.\mm;
+               tie_x_minimum=40.0*\interline;
+       }
+}
index 0bce164e3d830b424ca451ee3a2cd021eaba7e93..45496fe22c8d9089580fbe4295e67beafd515cf5 100644 (file)
@@ -1,13 +1,8 @@
-# intl/Makefile
+# intl/GNUmakefile
 
 depth = ..
-
 NAME = intl
 
-
-# MODULE_CXXFLAGS += -D_REENTRANT
-MAINTARGET = $(LIBRARY)# huh?
-
 SED_FILES = $(wildcard *.sed)
 
 # should be set by configure...
@@ -16,19 +11,18 @@ EXTRA_CFLAGS = -I. $(URG_DEFINES)
 
 EXTRA_DIST_FILES = Makefile.in.dist cat-compat.c.dist ChangeLog libintl.inst $(SED_FILES)
 
+STEPMAKE_TEMPLATES=c library
 
+$(outdir)/library.a:
+       @echo "*** To install libintl type 'make lib; make install-lib' ***"
 
-STEPMAKE_TEMPLATES=c
 include $(depth)/make/stepmake.make
 
-default:
-       @echo "to install libintl type 'make lib; make install-lib'"
-
 lib:  $(LIBRARY)
 LIBINTL = $(LIBRARY)
 
-install-lib: $(LIBINTL)
 # localinstall: $(LIBINTL)
+install-lib: $(LIBINTL)
        $(INSTALL) -d $(includedir)
 #      $(INSTALL) libintl.h $(includedir)
        $(INSTALL) libintl.inst $(includedir)/libintl.h
@@ -39,12 +33,10 @@ ifeq ($(LIB_SUFFIX),.so)
        ln -s $(LIB_PREFIX)intl$(LIB_SUFFIX).$(VERSION) $(libdir)/$(LIB_PREFIX)intl$(LIB_SUFFIX)
 else
        $(INSTALL) -d $(libdir)
-       echo libintl: $(LIBINTL)
-       echo libdir: $(libdir)
-       $(INSTALL) $(LIBINTL) $(libdir)
+       $(INSTALL) $(LIBINTL) $(libdir)/$(INSTALL_LIBRARY)
 endif
 
 localuninstall:
-       rm -f $(inludedir)/libintl.h
+       rm -f $(includedir)/libintl.h
        rm -f $(libdir)/libintl.{so*,a}
 
index 30123a335b1a23b8de06ee112c5d55c06755e947..077b5a833eee5a2094dc306878f12810a5c20bf3 100644 (file)
@@ -7,10 +7,8 @@
 #ifndef SLUR_HH
 #define SLUR_HH
 
-#include "directional-spanner.hh"
-#include "lily-proto.hh"
-#include "parray.hh"
 #include "bow.hh"
+#include "rod.hh"
 
 /**
   A #Bow# which tries to drape itself around the stems too.
@@ -33,6 +31,8 @@ protected:
   virtual void do_add_processing ();
   virtual void do_pre_processing ();
   virtual void do_substitute_dependency (Score_element*, Score_element*);
+  virtual Interval do_width () const;
+  Array<Rod> get_rods () const;
 };
 
 #endif // SLUR_HH
index 34e829d634ae8a00d1b13faac35ced2a8936b44f..c87555367f6d94ec4367fe325f30f6da362f049f 100644 (file)
@@ -46,11 +46,10 @@ class Stem : public Item {
     */
   Direction  stem_xdir_;
 
+public:
   Link_array<Note_head> head_l_arr_;
   Link_array<Rest> rest_l_arr_;
     
-public:
-
   /// how many abbrev beam don't reach stem?
   int beam_gap_i_;
 
index b58101532c4ec39550a97b633051f0d73d2a0b68..15ead2f8ea5fca54704eca3a9c992910ab0783ad 100644 (file)
@@ -44,10 +44,10 @@ protected:
   virtual bool do_try_music (Music*);
   virtual void do_process_requests ();
   virtual void process_acknowledged ();
+
 public:
   VIRTUAL_COPY_CONS(Translator);
   Tie_engraver();
-  
 };
 
 #endif /* CTIE_ENGRAVER_HH */
index 522203d9c0c67076b74265d845c348bc1c31572f..3bca552fb2e414072926aa7499687bb7b8304861 100644 (file)
@@ -11,6 +11,7 @@
 #define TIE_HH
 
 #include "bow.hh"
+#include "rod.hh"
 
 /**
   Connect two noteheads.
 class Tie : public Bow
 {
 public:
-    Tie ();
-    void set_head (Direction, Note_head*head_l);
-
-    
-    VIRTUAL_COPY_CONS(Score_element);
-
-    bool same_pitch_b_;
-    Drul_array<Note_head *> head_l_drul_;
+  Tie ();
+  void set_head (Direction, Note_head*head_l);
+  
+  
+  VIRTUAL_COPY_CONS(Score_element);
+  
+  bool same_pitch_b_;
+  Drul_array<Note_head *> head_l_drul_;
 
 protected:
-    virtual void do_add_processing ();
-    virtual void do_post_processing ();
-    virtual void set_default_dir();
-    virtual void do_substitute_dependency (Score_element*,Score_element*);
-    Array<Offset> get_controls () const;
+  virtual void do_add_processing ();
+  virtual void do_post_processing ();
+  virtual void set_default_dir();
+  virtual void do_substitute_dependency (Score_element*,Score_element*);
+  virtual Interval do_width () const;
+  Array<Rod> get_rods () const;
+
+  Array<Offset> get_controls () const;
 };
+
 #endif // TIE_HH
index e5b9f4d88d5f81336d0188cc0be6989b9067d32b..ef773b2cc6e5baf54f18d50bccd710572fa5a83f 100644 (file)
@@ -102,7 +102,6 @@ Slur::do_post_processing ()
   Real internote_f = interline_f / 2;
   // URG
   Real notewidth_f = paper ()->note_width () * 0.8;
-  Real slur_min = paper ()->get_var ("slur_x_minimum");
 
   /* 
    [OSU]: slur and tie placement
@@ -190,21 +189,6 @@ Slur::do_post_processing ()
            dy_f_drul_[u] += dir_ * internote_f;
 
          dy_f_drul_[d] = dy_f_drul_[(Direction)-d];
-
-       /*
-        urg, this is broken
-        but who *is* going to assure that dx >= slur_min?
-        */
-#if 0
-
-         if (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT] < slur_min)
-           {
-           // huh? what was this supposed to do?
-//           dx_f_drul_[d] -= d * slur_min 
-//             - (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
-             dx_f_drul_[d] = dx_f_drul_[(Direction)-d] + d * slur_min;
-           }
-#endif
        }
      }
   while (flip(&d) != LEFT);
@@ -220,8 +204,8 @@ Slur::do_post_processing ()
 
   Real ratio_f = abs (d_off.y () / d_off.x ());
   if (ratio_f > damp_f)
-    dy_f_drul_[(Direction)(- dir_ * sign (d_off.y ()))] -=
-      dir_ * (damp_f - ratio_f) * d_off.x ();
+    dy_f_drul_[(Direction)(- dir_ * sign (d_off.y ()))] +=
+      dir_ * (ratio_f - damp_f) * d_off.x ();
 }
 
 Array<Offset>
@@ -298,3 +282,21 @@ Slur::get_encompass_offset_arr () const
   return notes;
 }
 
+Interval
+Slur::do_width () const
+{
+  Real min_f = paper ()->get_var ("slur_x_minimum");
+  Interval width_int = Bow::do_width ();
+  return width_int.length () < min_f ? Interval (0, min_f) : width_int;
+}
+
+Array<Rod>
+Slur::get_rods () const
+{
+  Array<Rod> a;
+  Rod r;
+  r.item_l_drul_ = spanned_drul_;
+  r.distance_f_ = do_width ().length ();
+  a.push (r);
+  return a;
+}
index 167940a687264948ff5fa1b88218c8f5663ac338..cbf3f2e7c305c2a3add6243e33faf9d85fb5f48b 100644 (file)
@@ -668,8 +668,11 @@ Spring_spacer::calc_idealspacing()
          */
          if (i && scol_l (i - 1)->breakable_b_)
            {
-             // fixed: probably should set minimum (rod/spring)?
-             cols_[i-1].width_[RIGHT] += interline_f;
+             // one interline minimum at start of bar
+
+             // cols_[i].width_[RIGHT] += interline_f;
+             cols_[i].width_[RIGHT] = cols_[i].width_[RIGHT] >? interline_f;
+
              // should adjust dist too?
              ideal_arr[i-1] = ideal_arr[i-1] >? (2 * interline_f);
            }
@@ -679,17 +682,28 @@ Spring_spacer::calc_idealspacing()
          */
          if (i + 1 < cols_.size () && scol_l(i+1)->breakable_b_)
            {
-             // hmm, how bout?
+             // one interline minimum seems ok for last column too?
              dist = dist >? interline_f;
 
+             // set minimum rod 
              /*
-               uhuh, this code looks fine, already?
-               someone was junking this last "hinterfleisch" whitespace?!
+               urg: simply *adding* an interline leaves big gaps at
+               end of measure in star-spangled-banner (after lyrics
+               at eom).
 
-               but this seems to be fixed now :-)
-             */
-             // set minimum rod 
-             cols_[i].width_[RIGHT] += interline_f;
+                  cols_[i].width_[RIGHT] += interline_f; // before
+
+               having a minimum of one interline solves this problem
+               in most (but not all??) cases.
+
+               for music without lyrics (esp. when set very tightly),
+               adding an interline looks good: probably because this
+               hides a bug that allows the last note's "hinterfleish"
+               to be removed (e.g., see wtk1-fugue2: that's ugly now).
+               -- jcn
+              */
+
+             cols_[i].width_[RIGHT] = cols_[i].width_[RIGHT] >? interline_f;
            }
 
          // ugh, do we need this?
index cf9dd50f7c0af80c24aaa8b411f9c3cc34716501..9a78dd4109829124ee8bddde34f71b32f2fd4876 100644 (file)
@@ -93,10 +93,20 @@ Tie_engraver::do_pre_move_processing ()
     {
       past_notes_pq_.insert (now_heads_[i]);
     }
-  now_heads_.clear( );
+  now_heads_.clear ();
+
+  Scalar dir (get_property ("tieydirection", 0));
+  Scalar dir2 (get_property ("ydirection", 0));
+
+  Direction tie_dir = CENTER;
+  if (dir.length_i () && dir.isnum_b ())
+    tie_dir = (Direction) sign (int(dir));
+  else if (dir2.length_i () && dir2.isnum_b ())
+    tie_dir = (Direction) sign (int (dir2));
   
   for (int i=0; i<  tie_p_arr_.size (); i++)
-    {
+   {
+      tie_p_arr_[i]->dir_ = tie_dir;
       typeset_element (tie_p_arr_[i]);
     }
   tie_p_arr_.clear ();
@@ -111,8 +121,6 @@ Tie_engraver::do_post_move_processing ()
     past_notes_pq_.delmin ();
 }
 
-
-
 ADD_THIS_TRANSLATOR(Tie_engraver);
 
 
index cc68a065e33f67258edef983ee95c30de0632249..7b0cbc870b9cd7fa13c514c8738d0d657600e587 100644 (file)
@@ -64,9 +64,9 @@ Tie::do_post_processing()
   // URG: share code with slur!
   assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]);
 
-  Real notewidth = paper ()->note_width ();
+  // URG
+  Real notewidth = paper ()->note_width () * 0.8;
   Real interline_f = paper ()->interline_f ();
-  Real tie_min = paper ()->get_var ("tie_x_minimum");
 
   /* 
    [OSU]: slur and tie placement
@@ -121,20 +121,6 @@ Tie::do_post_processing()
       // tie attached to outer notehead
       if (!head_l_drul_[d])
        {
-
-       /*
-        urg, this is broken
-        but who *is* going to assure that dx >= tie_min?
-        */
-#if 0
-         if (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT] < tie_min)
-           {
-//           dx_f_drul_[d] -= d * tie_min 
-//             - (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
-             dx_f_drul_[d] = dx_f_drul_[(Direction)-d] + d * tie_min;
-           }
-#endif
-
          dy_f_drul_[d] = dy_f_drul_[(Direction) -d];
        }
     }
@@ -151,8 +137,8 @@ Tie::do_post_processing()
 
   Real ratio_f = abs (d_off.y () / d_off.x ());
   if (ratio_f > damp_f)
-    dy_f_drul_[(Direction)(- dir_ * sign (d_off.y ()))] -=
-      dir_ * (damp_f - ratio_f) * d_off.x ();
+    dy_f_drul_[(Direction)(- dir_ * sign (d_off.y ()))] +=
+      dir_ * (ratio_f - damp_f) * d_off.x ();
 }
 
 void
@@ -165,3 +151,21 @@ Tie::do_substitute_dependency (Score_element*o, Score_element*n)
     head_l_drul_[RIGHT] = new_l;
 }
 
+Interval
+Tie::do_width () const
+{
+  Real min_f = paper ()->get_var ("tie_x_minimum");
+  Interval width_int = Bow::do_width ();
+  return width_int.length () < min_f ? Interval (0, min_f) : width_int;
+}
+
+Array<Rod>
+Tie::get_rods () const
+{
+  Array<Rod> a;
+  Rod r;
+  r.item_l_drul_ = spanned_drul_;
+  r.distance_f_ = do_width ().length ();
+  a.push (r);
+  return a;
+}
index b94c31d875a993981174aaf070bdf67bf8ab0496..f98ac790802d1a8fa872817db0e2e8d97b758b9c 100644 (file)
@@ -65,20 +65,23 @@ beam_steep_slope = 0.2 / 1.0;
 
 % OSU: suggested gap = ss / 5;
 slur_x_gap = \interline / 5.0;
-slur_x_minimum = 2.0 * \interline;
-slur_slope_damping = 0.5;
+slur_x_minimum = 3.0 * \interline;
+
+% slope damping: keep dy/dx < slur_slope_damping
+slur_slope_damping = 0.6;
+
 tie_x_minimum = \slur_x_minimum;
 tie_x_gap = \slur_x_gap;
-tie_slope_damping = 0.3;
+tie_slope_damping = 0.8;
 
 % ugh: rename to bow (in bezier.cc and fonts.doc too...)
 % slur_thickness = 1.8 * \staffline;
 slur_thickness = 1.4 * \staffline;
 slur_height_limit = \staffheight;
 
-% mmm, try bit flatter slurs
-% slur_ratio = 1.0 / 3.0;
-slur_ratio = 0.3;
+% slur_ratio = 0.3;
+% try bit flatter slurs
+slur_ratio = 0.25;
 slur_clip_ratio = 1.2;
 slur_clip_height = 3.0 * \staffheight;
 slur_clip_angle = 100.0;
index c180b38ef48a5bdf8c0f322474b6201d847e497d..3ae97919be75f17ccc2043b922e677caa1d9bbf1 100644 (file)
@@ -1,11 +1,12 @@
 \header {
   filename =    "wtk1-fugue2.ly";
-  title =       "Fuga a 3";
+  title =       "Fuga II";
+  subtitle =    "\\`a 3 voci";
   description = "Das Wohltemperierte Clavier I, Fuga II (c-minor)";
   opus =        "BWV 847-Fuga";
   source =      "Henle's Urtext";
   composer =    "Johann Sebastian Bach (1685-1750)";
-  enteredby =   "HWN, WL";
+  enteredby =   "hwn, wl, jcn";
   copyright =   "Public Domain";
 }
 
@@ -123,7 +124,6 @@ comes = \type Voice=one \notes \relative c'' {
   f,16 g as4 g16 f e2 |
 }
 
-
 bassdux = \type Voice=three \notes \relative c' {
   \clef bass;
   R1 |
@@ -164,8 +164,8 @@ bassdux = \type Voice=three \notes \relative c' {
   d c g' g, 
 %%30
   \type Staff=bass <
-  {\voicethree c2 ~ | c1 ~ | c1 }
-  {\voicefour c,2 ~ | c1 ~ | c1 }
+    {\stemup c2 ~ | c1 ~ | c1 }
+    \type Voice=four {\stemdown c,2 ~ | c1 ~ | c1 }
   >
 }
 
index 6bdc6921c03a4de24be95b254e8aef65a5d46856..55b82ab1823fb26a27696fd27bf28d042e68a5b8 100644 (file)
@@ -1,7 +1,2 @@
-#empty
-
-$(configheader): $(depth)/config.h
-       cp $< $@
-
 $(configheader): $(depth)/config.h
        cp $< $@
index 037f8ae80582f40bb69f1e82b7339dce34a5b65c..b2555a9c84588c96f9a8eea8ff08dbb4233d6cd0 100644 (file)
@@ -15,5 +15,8 @@ AR_COMMAND = $(AR) $(ARFLAGS) $@
 RANLIB_COMMAND=$(RANLIB) $@ || $(AR) ts $@ || true
 
 # linker:
+# urg, i don't like this name, it's not what you'd expect
 LIBRARY = $(outdir)/library.a
-SHAREDLIBRARY=$(outdir)/$(LIB_PREFIX)$(NAME).so
+
+INSTALL_LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
+SHARED_LIBRARY=$(outdir)/$(LIB_PREFIX)$(NAME).so