]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.1.29.jcn3: sleur volg muziek fix
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 10 Feb 1999 16:05:06 +0000 (17:05 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 10 Feb 1999 16:05:06 +0000 (17:05 +0100)
pl 29.jcn3
- fix: slur-case3.ly
- init.sly: .fly with linewidt=-1

---
Generated by janneke@gnu.org using package-diff 0.62,
>From = lilypond-1.1.29.jcn2, To = lilypond-1.1.29.jcn3

usage

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.1.29.jcn3.diff

Patches do not contain automatically generated files
or (urg) empty directories,
i.e., you should rerun autoconf, configure
and possibly make outdirs.

--state
1.1.29.jcn2
1.1.29.jcn3
++state

NEWS
TODO
VERSION
input/test/slur-follow-music.sly [new file with mode: 0644]
lily/include/direction.hh
lily/main.cc
lily/slur.cc
ly/GNUmakefile
ly/init.sly [new file with mode: 0644]
ly/params.ly
make/mutopia-vars.make

diff --git a/NEWS b/NEWS
index be611e77e1fc4144d61890add04225b165f4b383..607407ff6e609793b971d14335bbeb6b8c84e13a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,13 @@
---- ../lilypond-1.1.29.jcn1/NEWS       Tue Feb  9 17:15:49 1999
+--- ../lilypond-1.1.29.jcn2/NEWS       Tue Feb  9 22:46:07 1999
+++ b/NEWS      Wed Feb 10 15:21:05 1999
+@@ -1,3 +1,7 @@
+pl 29.jcn3
+       - fix: slur-case3.ly 
+       - init.sly: .fly with linewidt=-1
+
+ pl 29.jcn2
+       - resurrected ps output
+ --- ../lilypond-1.1.29.jcn1/NEWS      Tue Feb  9 17:15:49 1999
 ++ b/NEWS      Tue Feb  9 22:46:07 1999
 @@ -1,3 +1,6 @@
 pl 29.jcn2
diff --git a/TODO b/TODO
index 1de14911bf70475cbfb9835869afbe54df13ca2e..a5b256713df2fea94d62d33bc734f8360f589d62 100644 (file)
--- a/TODO
+++ b/TODO
@@ -63,9 +63,13 @@ specify the third.  Should there be?
 .* TODO before 1.2
 . *
 > Yes.  I want ties to tie only notes of the same pitch, so that
->      < a~  a,>  a
+>      < a~  a,>  a
 > works as you'd expect it to.
+
+I don't think that's functional, but there is a bug (--jcn):
+Lily will set a tie between the a and the preceeding f.
 . * 1. Can Lily be told where to start numbering?
+Fix: set bar-number to 0 if first bar is an anacrouse?
 . * The timpani part has rests the full first line. Is it possible
    to force lilypond to print all parts on the first page of the score
    but use the hara-kiri mechanism on the remaining pages?
@@ -729,12 +733,13 @@ if you just sit there."
   "Additional expressions to highlight in Outline mode.")
 
 (add-hook 'outline-mode-hook
-         (lambda ()
+         '(lambda ()
            (setq font-lock-maximum-decoration t)
            (setq font-lock-maximum-decoration t)
            (make-local-variable 'font-lock-defaults)
            (setq font-lock-defaults '(outline-font-lock-keywords t))
-           (font-lock-mode (global-font-lock-mode))))
+           (font-lock-mode global-font-lock-mode)
+       ))
  
 (require 'allout)
 (outline-init 't)
diff --git a/VERSION b/VERSION
index d986ff64a5b0128937d0872561c681ad84fef39b..537aaa1c96e8ef6f0e9681a118914e4dd3353c1e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
 PATCH_LEVEL=29
-MY_PATCH_LEVEL=jcn2
+MY_PATCH_LEVEL=jcn3
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/input/test/slur-follow-music.sly b/input/test/slur-follow-music.sly
new file mode 100644 (file)
index 0000000..bc28469
--- /dev/null
@@ -0,0 +1,15 @@
+% CASE 3
+d''4 ( ) b a ( ) e' \break
+g,( \stemdown ) b \stemboth c ( ) f, \break
+
+% no adjusting...
+\stemup [d'8 ( b a] \stemboth ) e' \break
+\stemup [g,8 ( b d] \stemboth ) c \break
+
+% still ugly
+g4 ( b d ) c \break
+
+%TIES
+d ~ b a ~ e' \break
+g, ~ \stemdown b \stemboth c ~ f, \break
+
index 8a59ac52f7c5d91b4274936c8493e2f3d62d17d1..3b2029d3c89a4c52659ef008e36fcb7af944b4d5 100644 (file)
@@ -27,6 +27,19 @@ enum Direction
   STOP = 1
 };
 
+inline Direction
+other_dir (Direction const d)
+{
+  return (Direction)(-d);
+}
+
+inline Direction
+operator - (Direction const d)
+{
+  return other_dir (d);
+}
+
+// huh?
 inline Direction
 flip (Direction *i) {
   if (*i == (Direction)1)
index e8e55b5bafb752f75c8d3f4ead661cc89058d1d6..c6197016639ad77b4787e759ca28a15601022e31 100644 (file)
@@ -401,12 +401,15 @@ distill_inname_str (String name_str, String& ext_r)
          split_path (str,a,b,c,ext_r);
 
          // add extension if not present.
-         // UGH. Should parametrise in list of default extensions.
-         if (ext_r.empty_b ())
+         char const* extensions[] = {"", "", ".ly", ".fly", ".sly", 0};
+         extensions[0] = ext_r.ch_C ();
+         for (int i = 0; extensions[i]; i++)
            {
-             ext_r = ".fly";
-             if (global_path.find (a+b+c+ext_r).empty_b ())
-               ext_r = ".ly";
+             if (!global_path.find (a+b+c+extensions[i]).empty_b ())
+               {
+                 ext_r = extensions[i];
+                 break;
+               }
            }
          str = a+b+c+ext_r;
        }
index 2a7c7014a1723f5b8f039b813166c5155b786429..62cf0016ce91d97130ea40ce416ea3c1bcd366e7 100644 (file)
@@ -122,6 +122,11 @@ Slur::do_post_processing ()
 
   Direction d=LEFT;
  
+#define NORMAL_SLUR_b(dir) \
+  (extrema[dir]->stem_l_ \
+   && !extrema[dir]->stem_l_->transparent_b_  \
+   && extrema[dir]->head_l_arr_.size ()) 
+
   do 
     {
       /*
@@ -146,8 +151,7 @@ Slur::do_post_processing ()
       /*
         normal slur
        */
-      else if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_ 
-              && extrema[d]->head_l_arr_.size ()) 
+      else if (NORMAL_SLUR_b (d))
         {
          Real notewidth_f = extrema[d]->extent (X_AXIS).length ();
          dy_f_drul_[d] = (int)rint (extrema[d]->stem_l_-> extent (Y_AXIS)[dir_]);
@@ -193,9 +197,44 @@ Slur::do_post_processing ()
      }
   while (flip(&d) != LEFT);
 
+  /*
+    Slur should follow line of music
+   */
+  if (NORMAL_SLUR_b (LEFT) && NORMAL_SLUR_b (RIGHT)
+      && (extrema[LEFT]->stem_l_ != extrema[RIGHT]->stem_l_))
+    {
+      Real note_dy = extrema[RIGHT]->stem_l_->head_positions ()[dir_]
+       - extrema[LEFT]->stem_l_->head_positions ()[dir_];
+      Real dy = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
+      /*
+       Should we always follow note-heads, (like a tie)?
+       For now, only if the note_dy != slur_dy, we'll do
+       slur_dy := note_dy * factor.
+      */
+      if (sign (dy) != sign (note_dy))
+       {
+         Real damp_f = paper ()->get_var ("slur_slope_follow_music_factor");
+         Real dy = note_dy * damp_f;
+         Direction adjust_dir = (Direction)(- dir_ * sign (dy));
+         /*
+           adjust only if no beam gets in the way
+          */
+         if (!extrema[adjust_dir]->stem_l_->beam_l_
+             || (adjust_dir == extrema[adjust_dir]->stem_l_->dir_)
+             || (extrema[adjust_dir]->stem_l_->beams_i_drul_[-adjust_dir] < 1))
+           {
+             dy_f_drul_[adjust_dir] = dy_f_drul_[-adjust_dir]
+               + 2 * adjust_dir * dy;
+             Real dx = notewidth_f / 2;
+             if (adjust_dir != extrema[adjust_dir]->stem_l_->dir_)
+               dx /= 2;
+             dx_f_drul_[adjust_dir] -= adjust_dir * dx;
+           }
+       }
+    }
+
   /*
     Avoid too steep slurs.
-      * slur from notehead to stemend: c''()b''
    */
   Real damp_f = paper ()->get_var ("slur_slope_damping");
   Offset d_off = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
@@ -302,3 +341,4 @@ Slur::get_rods () const
   a.push (r);
   return a;
 }
+
index 6513297576c50209155a431b3cd6c498a3da6941..dda5863d2675a2898f4131c153c222205338b531 100644 (file)
@@ -2,7 +2,7 @@
 
 depth = ..
 
-INI_FILES = $(FLY_FILES) $(LY_FILES)
+INI_FILES = $(FLY_FILES) $(SLY_FILES) $(LY_FILES)
 EXTRA_DIST_FILES = $(SCM_FILES)
 
 INSTALLATION_DIR=$(datadir)/ly/
diff --git a/ly/init.sly b/ly/init.sly
new file mode 100644 (file)
index 0000000..e2ebe19
--- /dev/null
@@ -0,0 +1,16 @@
+% Toplevel initialisation file. 
+       
+\version "1.0.14";
+
+
+\include "declarations.ly"
+
+\score { 
+  \notes\relative c {
+    \maininput
+  }
+  \paper {
+    linewidth=-1.0;
+  }  
+  \midi{ }
+}
index f434d57cf425e990e15d72867dfb9fdd32507d41..8be7f2a9b26ef95ff1be0a64df4cbe30231f9ce2 100644 (file)
@@ -70,6 +70,9 @@ slur_x_minimum = 3.0 * \interline;
 % slope damping: keep dy/dx < slur_slope_damping
 slur_slope_damping = 0.6;
 
+% dy_slur := dy_music * factor
+slur_slope_follow_music_factor = 0.8;
+
 tie_x_minimum = \slur_x_minimum;
 tie_x_gap = \slur_x_gap;
 tie_slope_damping = 0.8;
index d140f286cf24d9dbe250c5b5347f9df84196280a..154917110b1af7d4a917879fa12702308430853f 100644 (file)
@@ -2,18 +2,21 @@
 # UGH UGH
 include $(make-dir)/lilypond-vars.make
 
-FLY_FILES = $(wildcard *.fly)
 LY_FILES = $(wildcard *.ly)
+FLY_FILES = $(wildcard *.fly)
+SLY_FILES = $(wildcard *.sly)
+
 M4_FILES = $(wildcard *.m4)
 LYM4_FILES = $(wildcard *.lym4)
-EXTRA_DIST_FILES += $(FLY_FILES) $(LY_FILES) $(M4_FILES) $(LYM4_FILES)
+EXTRA_DIST_FILES += $(FLY_FILES) $(SLY_FILES) $(LY_FILES) $(M4_FILES) $(LYM4_FILES)
 
 # WWW.make
 
 ly_examples=$(addprefix $(outdir)/, $(addsuffix .ly.txt, $(examples)))
 fly_examples=$(addprefix $(outdir)/, $(addsuffix .fly.txt, $(flexamples)))
+sly_examples=$(addprefix $(outdir)/, $(addsuffix .sly.txt, $(slexamples)))
 
-all_examples=$(flexamples) $(examples)
+all_examples=$(flexamples) $(slexamples) $(examples)
 
 ps_examples=$(addprefix $(outdir)/, $(addsuffix .ps.gz, $(all_examples)))
 gif_examples=$(addprefix $(outdir)/, $(addsuffix .gif, $(all_examples)))