]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.78.jcn5
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 17 Aug 2000 22:19:10 +0000 (00:19 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 17 Aug 2000 22:19:10 +0000 (00:19 +0200)
1.3.78.jcn5
===========

* Made crude fixes so unbound slurs don't crash, bezier still crashes on
  infinitely steep slurs (eg flauti-part *with* slur_engraver).

CHANGES
VERSION
input/bugs/almost.ly
input/test/hymn.ly
lily/include/slur.hh
lily/slur.cc
ly/engraver.ly
mutopia/Coriolan/flauti-part.ly
mutopia/Coriolan/flauti.ly
scm/slur.scm

diff --git a/CHANGES b/CHANGES
index a3bd728da0b74b90af66ce2d8d0ceed65e30010f..ebf487e4b05b1ef507d48505067116dd7241f0df 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+1.3.78.jcn5
+===========
+
+* Made crude fixes so unbound slurs don't crash, bezier still crashes on
+  infinitely steep slurs (eg flauti-part *with* slur_engraver).
+
 1.3.78.jcn4
 ===========
 
diff --git a/VERSION b/VERSION
index bc65a00325737f8ca764b118129c8543c8efc2ed..fe8e60a2d494c26b60ab4bda2e7de1bb2af27efa 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=78
-MY_PATCH_LEVEL=jcn4
+MY_PATCH_LEVEL=jcn5
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 7276562718357d7d3e4d06e134a3fb0e417d9a00..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,18 +0,0 @@
-\score{
-       \context Staff <
-               \context Voice=one { \skip 1; }
-               \context Voice=two { \skip 1; }
-
-               \context Voice=one \partcombine Voice
-                       \context Thread=one \notes\relative c'' {
-                               a4 c4.()g8 a4
-                       }
-                       \context Thread=two \notes\relative c'' {
-                               g4 e4.()d8 c4
-                       }
-       >
-       \paper{
-               linewidth=60.\mm;
-       }
-}
-
index 8003c4dbd42960d6e721d4a53d43f94b5457ad59..cecbbfc731dc81feb4a0b4578b9981d3e8b4f27e 100644 (file)
@@ -1,17 +1,15 @@
 \score{
        \context Staff <
-               \context Voice=one { \skip 1; }
-               \context Voice=two { \skip 1; }
-
+               \time 4/4;
                \context Voice=one \partcombine Voice
                        \context Thread=one \notes\relative c'' {
-                               %a4 c4.()g8 a4 |
+                               a4 c4.()g8 a4 |
                                g4 e' g()f | 
                                b, a c2
                        }
                        \context Thread=two \notes\relative c'' {
-                               %g4 e4.()d8 c4 |
-                               g4 c, e()f |
+                               g4 e4.()d8 c4 |
+                               g'4 c, e()f |
                                d2 a
                        }
        >
                \translator {
                        \VoiceContext
                        soloADue = ##f
-                       %\remove Slur_engraver;
-                       \consists Slur_engraver;
                }
-%              \translator {
-%                      \ThreadContext
-%                      \consists Slur_engraver;
-%              }
        }
 }
 
index 83d0900834b88ba1306d92a903a0d1646b6daa24..096d96ab2ea7791d2827466b58d836842f294ed5 100644 (file)
@@ -21,6 +21,7 @@ public:
   static Array<Offset> get_encompass_offset_arr (Score_element*me) ;
   static Bezier get_curve (Score_element*me) ;
   static Direction get_default_dir (Score_element*me) ;
+  static SCM before_line_breaking (SCM);
   static SCM after_line_breaking (SCM);
   static SCM set_spacing_rods (SCM);
 private:  
index ccad52d81cd9172fdc879cacb1180f2923cbcaf2..40985d33c00a19dfd95ea5705ba03bb831fff1a6 100644 (file)
@@ -150,14 +150,28 @@ Slur::encompass_offset (Score_element*me,
   return o;
 }
 
-MAKE_SCHEME_CALLBACK(Slur,after_line_breaking);
+MAKE_SCHEME_CALLBACK (Slur, before_line_breaking);
+SCM
+Slur::before_line_breaking (SCM smob)
+{
+  Score_element *me = unsmob_element (smob);
+  if (Pointer_group_interface__extract_elements (me, (Score_element*)0, "note-columns").size () < 2)
+    me->suicide ();
+  return SCM_UNSPECIFIED;
+}
 
+MAKE_SCHEME_CALLBACK(Slur,after_line_breaking);
 SCM
 Slur::after_line_breaking (SCM smob)
 {
   Score_element *me = unsmob_element (smob);
-  set_extremities (me);
-  set_control_points (me);
+  if (Pointer_group_interface__extract_elements (me, (Score_element*)0, "note-columns").size () < 2)
+    me->suicide ();
+  else
+    {
+      set_extremities (me);
+      set_control_points (me);
+    }
   return SCM_UNSPECIFIED;
 } 
 
@@ -281,7 +295,7 @@ Slur::get_attachment (Score_element*me,Direction dir,
 Array<Offset>
 Slur::get_encompass_offset_arr (Score_element*me) 
 {
-    Spanner*sp = dynamic_cast<Spanner*>(me);
+  Spanner*sp = dynamic_cast<Spanner*>(me);
   SCM eltlist = me->get_elt_property ("note-columns");
   Score_element *common[] = {me->common_refpoint (eltlist,X_AXIS),
                             me->common_refpoint (eltlist,Y_AXIS)};
@@ -376,11 +390,16 @@ SCM
 Slur::brew_molecule (SCM smob)
 {
   Score_element * me = unsmob_element (smob);
+  Molecule a;
+  if (Pointer_group_interface__extract_elements (me, (Score_element*)0, "note-columns").size () < 2)
+    {
+      me->suicide ();
+      return a.create_scheme ();
+    }
   Real thick = me->paper_l ()->get_var ("stafflinethickness") *
     gh_scm2double (me->get_elt_property ("thickness"));
   Bezier one = get_curve (me);
 
-  Molecule a;
   SCM d =  me->get_elt_property ("dashed");
   if (gh_number_p (d))
     a = me->lookup_l ()->dashed_slur (one, thick, thick * gh_scm2double (d));
index 16dbcfa15ef8ebbfcf8f2c2c8614f722aedb1e8e..1829e5f3787b547b62ff705581cb83c61eea5edd 100644 (file)
@@ -625,6 +625,7 @@ ScoreContext = \translator {
                (thickness . 1.2)               
                (spacing-procedure . ,Slur::set_spacing_rods)           e
                (minimum-length . 1.5)
+               (before-line-breaking-callback . ,Slur::before_line_breaking) 
                (after-line-breaking-callback . ,Slur::after_line_breaking) 
        )
        basicSpacingSpannerProperties =#`(
index 64c15a8d61f3cda2f736704194b9f629c12cffe2..182f57d2325ef0818f991cfb7243fd9ddc92209a 100644 (file)
@@ -16,7 +16,30 @@ copyright =   "public domain";
 
 \score{
        \$flauti_staff
-       \include "coriolan-part-paper.ly"
+       %\include "coriolan-part-paper.ly"
+
+       \paper {
+               textheight = 295.0\mm;
+               linewidth = 180.0\mm;
+
+               % slurs are never beautiful (no steep slurs)
+               slur_beautiful = 0.0;
+
+               \translator {
+                       \VoiceContext
+                       \remove Slur_engraver;
+               }
+               \translator { 
+                       \ScoreContext skipBars = ##t 
+                       %% URG: this changes dynamics too
+                       %%textStyle = #"italic"
+                       timeSignatureStyle = #"C"
+                       instrumentScriptPadding = #60  %% urg, this is in pt
+                       instrScriptPadding = #40 %% urg, this is in pt
+                       marginScriptHorizontalAlignment = #1
+                       maximumRestCount = #1
+               }
+       }
        \include "coriolan-midi.ly"
 }
 
index 83c1ea59c135b022ccfd0e43fdee33dae2e8a81d..9fe7ce067487e4618306f09bd0f4615049ac0614 100644 (file)
@@ -24,9 +24,8 @@ $flauti_staff = \notes \context Staff = flauti <
        \context Voice=one { \skip 1; }
        \context Voice=two { \skip 1; }
 
-       \context Voice=one \partcombine Voice <
+       \context Voice=one \partcombine Voice
                \context Thread=one \$flauto1
                \context Thread=two \$flauto2
-       >
 >
 
index dadeb3056c564716d33a23292f400f361f775d05..8863368991477ea3fbd6a3b801004ff7705187ec 100644 (file)
@@ -28,6 +28,9 @@
 
    ;; (cons (lambda (slur dir) (begin (display "before head") (newline))#f) #f)
 
+   (cons (lambda (slur dir)
+          (< (length (ly-get-elt-property slur 'note-columns)) 2)) 'head)
+
    (cons (lambda (slur dir)
           ;; urg, code dup
           (let* ((note-columns (ly-get-elt-property slur 'note-columns))