]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 10 Mar 2005 14:56:48 +0000 (14:56 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 10 Mar 2005 14:56:48 +0000 (14:56 +0000)
input/regression/new-slur.ly [deleted file]
input/regression/slur-scoring.ly [new file with mode: 0644]
lily/accidental.cc
lily/spaceable-grob.cc

diff --git a/input/regression/new-slur.ly b/input/regression/new-slur.ly
deleted file mode 100644 (file)
index 67193f4..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-
-\header {
-
-    texidoc = "Slur formatting is based on scoring. A large number of
-    slurs are generated. Each esthetic aspect gets demerits, the best
-    configuration (with least demerits) wins. This must be tested in
-    one big file, since changing one score parameter for one situation
-    may affect several other situations.
-
-    Tunable parameters are in @file{scm/slur.scm}. 
-"
-
-}
-
-\version "2.4.0"
-\layout {
-    raggedright = ##t
-%    #(define debug-slur-scoring #t)
-}
-
-%% help lilypond-book
-%% \score
-
-\relative {
-  
-    \grace e=''16( d8.[) c16]
-    d=''8.[ \grace f16( e16)]
-    s2
-    << {c=''8.([ es16] bes4~bes )}
-       \\
-       {r8  <as es> r <f des> r }
-    >>
-    \new Voice { \voiceOne b='8[ c16( d])  }
-    g='8[( a b b! ]  c4  bes) 
-    bes='8( f' des bes) as4( bes)
-    r8 d( f e d c b a)
-    cis=''4( d)  f'=''16( e)    d( c)
-    s4
-    
-    c'=''2(~c8 d16 c b8 a)
-    
-    <c=' g>4 ( f <g b>) f
-    <c g>^( f <g b>) f
-    <c g>_( f <g b>)
-    <g b>_( g  <b d>)
-    <g b>_( \stemDown g \stemNeutral  <b d>)
-    c,='^( c'' c) 
-    c,,^( c'')
-    c,,^( c')
-    | b='2( a4) s4
-    | b='4.( c8) s2
-    | << c=''1_(
-       { s2 \grace { b16[ c] } } >>
-    \break
-    b4)
-    e=''4.( c8) s4
-    | << { b='8[( c]) } \\
-        { b='8[( c]) }>>
-
-    
-    s2.|
-    e4( dis4)
-    e4( dis4) 
-    g='16( b d fis)
-    \clef bass a=8[ e16(f] g[ a b d,)]  s4 | \break
-    e=8[( f] g[ a b d,)]  s4 |
-    
-    \clef treble
-    \new Voice {
-       \slurDown
-       c=''4(^"slurs forced down"  d, c') s4
-       f=''2( d4 f | g c a f | d c f2 | f1) |
-    }
-
-%    \override Slur #'excentricity = #-2
-    c=''8 ( d[ b f d] a'[ c])
-}
-
diff --git a/input/regression/slur-scoring.ly b/input/regression/slur-scoring.ly
new file mode 100644 (file)
index 0000000..67193f4
--- /dev/null
@@ -0,0 +1,78 @@
+
+\header {
+
+    texidoc = "Slur formatting is based on scoring. A large number of
+    slurs are generated. Each esthetic aspect gets demerits, the best
+    configuration (with least demerits) wins. This must be tested in
+    one big file, since changing one score parameter for one situation
+    may affect several other situations.
+
+    Tunable parameters are in @file{scm/slur.scm}. 
+"
+
+}
+
+\version "2.4.0"
+\layout {
+    raggedright = ##t
+%    #(define debug-slur-scoring #t)
+}
+
+%% help lilypond-book
+%% \score
+
+\relative {
+  
+    \grace e=''16( d8.[) c16]
+    d=''8.[ \grace f16( e16)]
+    s2
+    << {c=''8.([ es16] bes4~bes )}
+       \\
+       {r8  <as es> r <f des> r }
+    >>
+    \new Voice { \voiceOne b='8[ c16( d])  }
+    g='8[( a b b! ]  c4  bes) 
+    bes='8( f' des bes) as4( bes)
+    r8 d( f e d c b a)
+    cis=''4( d)  f'=''16( e)    d( c)
+    s4
+    
+    c'=''2(~c8 d16 c b8 a)
+    
+    <c=' g>4 ( f <g b>) f
+    <c g>^( f <g b>) f
+    <c g>_( f <g b>)
+    <g b>_( g  <b d>)
+    <g b>_( \stemDown g \stemNeutral  <b d>)
+    c,='^( c'' c) 
+    c,,^( c'')
+    c,,^( c')
+    | b='2( a4) s4
+    | b='4.( c8) s2
+    | << c=''1_(
+       { s2 \grace { b16[ c] } } >>
+    \break
+    b4)
+    e=''4.( c8) s4
+    | << { b='8[( c]) } \\
+        { b='8[( c]) }>>
+
+    
+    s2.|
+    e4( dis4)
+    e4( dis4) 
+    g='16( b d fis)
+    \clef bass a=8[ e16(f] g[ a b d,)]  s4 | \break
+    e=8[( f] g[ a b d,)]  s4 |
+    
+    \clef treble
+    \new Voice {
+       \slurDown
+       c=''4(^"slurs forced down"  d, c') s4
+       f=''2( d4 f | g c a f | d c f2 | f1) |
+    }
+
+%    \override Slur #'excentricity = #-2
+    c=''8 ( d[ b f d] a'[ c])
+}
+
index 9aab78202a2dcf194d6aba3d6517d7d8f1d235ff..6522a843cd54fd8f83e5a17d10fc3e821c8e79f9 100644 (file)
@@ -68,7 +68,7 @@ Accidental_interface::accurate_boxes (Grob *a, Grob **common)
       && !parens
       && scm_ilength (accs) == 1)
     {
-      switch (scm_to_int (scm_car (accs))
+      switch (scm_to_int (scm_car (accs)))
        {
        case FLAT:
          {
@@ -114,21 +114,23 @@ Accidental_interface::accurate_boxes (Grob *a, Grob **common)
            TODO: add support for, double flat.
          */
        }
+    }
+      
+  if (!boxes.size ())
+    boxes.push (b);
 
-             if (!boxes.size ())
-               boxes.push (b);
+  Offset o (a->relative_coordinate (common[X_AXIS], X_AXIS),
+           a->relative_coordinate (common[Y_AXIS], Y_AXIS));
+  for (int i = boxes.size (); i--;)
+    {
+      boxes[i].translate (o);
+    }
 
-             Offset o (a->relative_coordinate (common[X_AXIS], X_AXIS),
-                       a->relative_coordinate (common[Y_AXIS], Y_AXIS));
-             for (int i = boxes.size (); i--;)
-               {
-                 boxes[i].translate (o);
-               }
+  return boxes;
+}
 
-             return boxes;
-             }
 
-      /*
+/*
        * Some styles do not provide all flavours of accidentals, e.g. there
        * is currently no sharp accidental in vaticana style.  In these cases
        * this function falls back to one of the other styles.
@@ -252,10 +254,10 @@ Accidental_interface::accurate_boxes (Grob *a, Grob **common)
        return mol.smobbed_copy ();
       }
 
-      /*
-       TODO: should move inside-slur into item?
+/*
+  TODO: should move inside-slur into item?
 
-      */
-      ADD_INTERFACE (Accidental_interface, "accidental-interface",
-                    "a single accidental",
-                    "inside-slur cautionary cautionary-style style tie accidentals");
+*/
+ADD_INTERFACE (Accidental_interface, "accidental-interface",
+              "a single accidental",
+              "inside-slur cautionary cautionary-style style tie accidentals");
index 17d15ba94b66664f2bb3bf1641adab698ae67d47..c8f8950b911f0e0906c087c27484d3d171962f78 100644 (file)
@@ -27,7 +27,10 @@ void
 Spaceable_grob::add_rod (Grob *me, Grob *p, Real d)
 {
   //  printf ("rod %lf\n", d);
-
+  if (isinf(d) || d < 0)
+    {
+      programming_error ("Weird rod");
+    }
 
   SCM mins = get_minimum_distances (me);
   SCM newdist = scm_make_real (d);