]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'dashed-slur2'
authorCarl Sorensen <c_sorensen@byu.edu>
Tue, 21 Apr 2009 23:02:00 +0000 (17:02 -0600)
committerCarl Sorensen <c_sorensen@byu.edu>
Tue, 21 Apr 2009 23:02:00 +0000 (17:02 -0600)
Update dashed-slur

Conflicts:
Documentation/user/expressive.itely
input/new/making-slurs-with-complex-dash-structure.ly
lily/arpeggio.cc
lily/bezier.cc
lily/include/bezier.hh
lily/lookup.cc
lily/slur.cc
lily/tie.cc
ly/property-init.ly
python/convertrules.py

13 files changed:
Documentation/user/expressive.itely
Documentation/user/rhythms.itely
input/regression/phrasing-slur-dash.ly
input/regression/slur-dash.ly
input/regression/tie-dash.ly [new file with mode: 0644]
lily/arpeggio.cc
lily/bezier.cc
lily/include/bezier.hh
lily/lookup.cc
lily/slur.cc
lily/tie.cc
ly/property-init.ly
python/convertrules.py

index 998461f47c797f3e47f6cde61162b44672129dba..129edfa528c9b29d7a97a0bedce09f423241cca8 100644 (file)
@@ -545,16 +545,13 @@ slur can overlap a slur.  This permits two slurs to be printed at
 once.  For details, see @ref{Phrasing slurs}.
 
 @cindex slur style
-@cindex solid slur
-@cindex dotted slur
-@cindex dashed slur
 @cindex slur, solid
 @cindex slur, dotted
 @cindex slur, dashed
 @cindex solid slur
 @cindex dotted slur
 @cindex dashed slur
-@cindex sytle, slur
+@cindex style, slur
 @funindex \slurDashed
 @funindex slurDashed
 @funindex \slurDotted
@@ -579,12 +576,14 @@ g4( e c2)
 @funindex slurHalfDashed
 @funindex \slurHalfSolid
 @funindex slurHalfSolid
+@cindex slur, half dashed and half solid
 
 Slurs can also be made half-dashed (the first half dashed, the
 second half solid) or half-solid (the first half solid, the second
 half dashed):
 
 @lilypond[verbatim,quote,relative=1]
+c4( e g2)
 \slurHalfDashed
 g4( e c2)
 \slurHalfSolid
@@ -593,6 +592,22 @@ c4( e g2)
 g4( e c2)
 @end lilypond
 
+@funindex \slurDashPattern
+@funindex slurDashPattern
+@cindex slur, defining dash patterns
+
+Custom dash patterns for slurs can be defined:
+
+@lilypond[verbatim,quote,relative=1]
+c4( e g2)
+\slurDashPattern #0.7 #0.75
+g4( e c2)
+\slurDashPattern #0.5 #2.0
+c4( e g2)
+\slurSolid
+g4( e c2)
+@end lilypond
+
 
 
 @funindex \slurUp
@@ -605,8 +620,9 @@ g4( e c2)
 @code{\slurNeutral},
 @code{\slurDashed},
 @code{\slurDotted},
-@code{\slurHaldDashed},
+@code{\slurHalfDashed},
 @code{\slurHalfSolid},
+@code{\slurDashPattern},
 @code{\slurSolid}.
 @endpredefined
 
@@ -665,12 +681,6 @@ e2) d\)
 @funindex phrasingSlurDown
 @funindex \phrasingSlurNeutral
 @funindex phrasingSlurNeutral
-@funindex phrasingSlurDashed
-@funindex \phrasingSlurDashed
-@funindex \phrasingSlurDotted
-@funindex phrasingSlurDotted
-@funindex \phrasingSlurSolid
-@funindex phrasingSlurSolid
 
 Typographically, a phrasing slur behaves almost exactly like a
 normal slur.  However, they are treated as different objects; a
@@ -686,13 +696,26 @@ c4\( g' c,( b) | c1\)
 
 @cindex simultaneous phrasing slurs
 @cindex multiple phrasing slurs
-@cindex slurs, simultaneous phrasing
-@cindex slurs, multiple phrasing
-@cindex phrasing slurs, simultaneous
-@cindex phrasing slurs, multiple
+@cindex slur, simultaneous phrasing
+@cindex slur, multiple phrasing
+@cindex phrasing slur, simultaneous
+@cindex phrasing slur, multiple
 
 Simultaneous or overlapping phrasing slurs are not permitted.
 
+@funindex phrasingSlurDashed
+@funindex \phrasingSlurDashed
+@funindex \phrasingSlurDotted
+@funindex phrasingSlurDotted
+@funindex \phrasingSlurSolid
+@funindex phrasingSlurSolid
+@cindex phrasing slur, dashed
+@cindex dashed phrasing slur
+@cindex phrasing slur, dotted
+@cindex dotted phrasing slurs
+@cindex slur, dashed phrasing
+@cindex slur, dotted phrasing
+
 Phrasing slurs can be solid, dotted, or dashed.  Solid is the default
 style for phrasing slurs:
 
@@ -706,6 +729,48 @@ c4\( e g2\)
 g4\( e c2\)
 @end lilypond
 
+@funindex phrasingSlurHalfDashed
+@funindex \phrasingSlurHalfDashed
+@funindex \phrasingSlurHalfSolid
+@funindex phrasingSlurHalfSolid
+@cindex phrasing slur, half solid and half dashed
+@cindex slur, half solid and half dashed phrasing
+
+Phrasing slurs can also be made half-dashed (the first half dashed, the
+second half solid) or half-solid (the first half solid, the second
+half dashed):
+
+@lilypond[verbatim,quote,relative=1]
+c4\( e g2\)
+\phrasingSlurHalfDashed
+g4\( e c2\)
+\phrasingSlurHalfSolid
+c4\( e g2\)
+\phrasingSlurSolid
+g4\( e c2\)
+@end lilypond
+
+@funindex \phrasingSlurDashPattern
+@funindex phrasingSlurDashPattern
+@cindex phrasing slur, defining dash patterns
+@cindex slur, phrasing, defining dash patterns
+@cindex slur, definind dash patterns for phrasing
+
+Custom dash patterns for phrasing slurs can be defined:
+
+@lilypond[verbatim,quote,relative=1]
+c4\( e g2\)
+\phrasingSlurDashPattern #0.7 #0.75
+g4\( e c2\)
+\phrasingSlurDashPattern #0.5 #2.0
+c4\( e g2\)
+\phrasingSlurSolid
+g4\( e c2\)
+@end lilypond
+
+Dash pattern definitions for phrasing slurs have the same structure
+as dash pattern definitions for slurs.  For more information about
+complex dash patterns, see the snippets under @ref{Slurs}.
 
 @predefined
 @code{\phrasingSlurUp},
@@ -713,6 +778,9 @@ g4\( e c2\)
 @code{\phrasingSlurNeutral},
 @code{\phrasingSlurDashed},
 @code{\phrasingSlurDotted},
+@code{\phrasingSlurHalfDashed},
+@code{\phrasingSlurHalfSolid},
+@code{\phrasingSlurDashPattern},
 @code{\phrasingSlurSolid}.
 @endpredefined
 
@@ -722,7 +790,8 @@ Learning Manual:
 @rlearning{On the un-nestedness of brackets and ties}.
 
 Notation Reference:
-@ref{Direction and placement}.
+@ref{Direction and placement},
+@ref{Slurs}.
 
 Snippets:
 @rlsr{Expressive marks}.
@@ -914,6 +983,8 @@ Different types of arpeggios may be written.
 @funindex arpeggioBracket
 @funindex \arpeggioParenthesis
 @funindex arpeggioParenthesis
+@funindex \arpeggioParenthesisDashed
+@funindex arpeggioParenthesisDashed
 
 Special @emph{bracketed} arpeggio symbols can be created:
 
@@ -923,10 +994,15 @@ Special @emph{bracketed} arpeggio symbols can be created:
 <c e g c>2\arpeggio
 \arpeggioParenthesis
 <c e g c>2\arpeggio
+\arpeggioParenthesisDashed
+<c e g c>2\arpeggio
 \arpeggioNormal
 <c e g c>2\arpeggio
 @end lilypond
 
+The dash properties of the parenthesis arpeggio are controlled
+with the @code{'dash-details} property, which is described at @ref{Slurs}.
+
 Arpeggios can be explicitly written out with ties.  For more
 information, see @ref{Ties}.
 
@@ -937,7 +1013,8 @@ information, see @ref{Ties}.
 @code{\arpeggioArrowDown},
 @code{\arpeggioNormal},
 @code{\arpeggioBracket},
-@code{\arpeggioParenthesis}.
+@code{\arpeggioParenthesis}
+@code{\arpeggioParenthesisDashed}.
 @endpredefined
 
 
@@ -958,6 +1035,7 @@ Music Glossary:
 @rglos{arpeggio}.
 
 Notation Reference:
+@ref{Slurs},
 @ref{Ties}.
 
 Snippets:
@@ -965,6 +1043,7 @@ Snippets:
 
 Internals Reference:
 @rinternals{Arpeggio},
+@rinternals{Slur},
 @rinternals{PianoStaff}.
 
 
index ae818694ac58e58df740519421e86697363f7f7f..3e395d31ea728d9ab30596b6e7b725ea734b75b5 100644 (file)
@@ -383,7 +383,7 @@ indicate articulation, or @emph{phrasing slurs}, which indicate
 musical phrasing.  A tie is just a way of extending a note
 duration, similar to the augmentation dot.}
 
-A tie is entered using the tilde symbol @code{~}
+A tie is entered using the tilde symbol (@code{~}).
 
 @lilypond[quote,verbatim,relative=2]
 a2 ~ a
@@ -481,9 +481,37 @@ Predefined commands, or for details, see
 @funindex \tieSolid
 @funindex tieSolid
 
-Solid, dotted or dashed ties may be specified, see Predefined
-commands.
+Ties may be made dashed, dotted, or a combination of solid and
+dashed.
 
+@lilypond[quote, verbatim, relative=1]
+\tieDotted
+c2 ~ c
+\tieDashed
+c2 ~ c
+\tieHalfDashed
+c2 ~ c
+\tieHalfSolid
+c2 ~ c
+\tieSolid
+c2 ~ c
+@end lilypond
+
+Custom dash patterns can be specified:
+
+@lilypond[quote, verbatim, relative=1]
+\tieDashPattern #0.3 #0.75
+c2 ~ c
+\tieDashPattern #0.7 #1.5
+c2 ~ c
+\tieSolid
+c2 ~ c
+@end lilypond
+
+Dash pattern definitions for ties have the same structure as 
+dash pattern definitions for slurs.
+For more information about complex dash patterns,
+see the snippets under @ref{Slurs}. 
 
 @predefined
 @code{\tieUp},
@@ -491,6 +519,9 @@ commands.
 @code{\tieNeutral},
 @code{\tieDotted},
 @code{\tieDashed},
+@code{\tieDashPattern},
+@code{\tieHalfDashed},
+@code{\tieHalfSolid},
 @code{\tieSolid}.
 @endpredefined
 
@@ -509,7 +540,9 @@ Music Glossary:
 @rglos{tie},
 @rglos{laissez vibrer}.
 
-Notation Reference: @ref{Automatic note splitting}.
+Notation Reference: 
+@ref{Slurs},
+@ref{Automatic note splitting}.
 
 Snippets:
 @rlsr{Rhythms}.
index f8b13f57d9dc6fd971359115002766723e29c786..d37053264da9d183fa5544b183a808f31d371083 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.12.0"
+\version "2.13.1"
 \header { texidoc = "
 The appearance of phrasing slurs may be changed from solid to dotted or dashed.
 "
@@ -10,8 +10,15 @@ The appearance of phrasing slurs may be changed from solid to dotted or dashed.
   c\( d e  c\) |
   \phrasingSlurDashed
   c\( d e  c\) |
-  \override PhrasingSlur #'dash-period = #2.0
-  \override PhrasingSlur #'dash-fraction = #0.4
+  \phrasingSlurHalfDashed
+  c\( d e  c\) |
+  \phrasingSlurHalfSolid
+  c\( d e  c\) |
+  \phrasingSlurDashPattern #0.4 #2.0
+  c\( d e  c\) |
+  \once \override Slur #'dash-definition = #'((0 0.25 1 1)
+                                              (0.3 0.7 0.4 0.75)
+                                              (0.75 1.0 1.0 1.0))
   c\( d e  c\) |
   \phrasingSlurSolid
   c\( d e  c\) |
index cd80e244b85e89565eee59a317893b10bfd78e1e..b1d111d2285338ca3dddbdbc1b5d9bea6a104871 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.12.0"
+\version "2.13.1"
 \header {texidoc = "@cindex Slur, dotted, dashed
 The appearance of slurs may be changed from solid to dotted or dashed.
 "
@@ -7,16 +7,23 @@ The appearance of slurs may be changed from solid to dotted or dashed.
 
 
 \relative c'{
-  c( d e  c) |
+  c( d e c) |
   \slurDotted
-  c( d e  c) |
+  c( d e c) |
   \slurDashed
-  c( d e  c) |
-  \override Slur #'dash-period = #2.0
-  \override Slur #'dash-fraction = #0.4
-  c( d e  c) |
+  c( d e c) |
+  \slurHalfDashed
+  c( d e c) |
+  \slurHalfSolid
+  c( d e c) |
+  \slurDashPattern #0.4 #2.0
+  c( d e c) |
+  \once \override Slur #'dash-definition = #'((0 0.25 1 1)
+                                              (0.3 0.7 0.4 0.75)
+                                              (0.75 1.0 1.0 1.0))
+  c( d e c) |
   \slurSolid
-  c( d e  c) |
+  c( d e c) |
 }
 
 
diff --git a/input/regression/tie-dash.ly b/input/regression/tie-dash.ly
new file mode 100644 (file)
index 0000000..7ad1815
--- /dev/null
@@ -0,0 +1,33 @@
+\version "2.13.1"
+\header {texidoc = "@cindex Tie, dotted, dashed
+The appearance of ties may be changed from solid to dotted or dashed.
+"
+} 
+\layout{ ragged-right=##t }
+
+
+\relative c'{
+  c2 ~ c |
+  \tieDotted
+  c2 ~ c |
+  \tieDashed
+  c2 ~ c |
+  \tieHalfDashed
+  c2 ~ c |
+  \tieHalfSolid
+  c2 ~ c |
+  \tieDashPattern #0.4 #2.0
+  c2 ~ c |
+  \once \override Tie #'dash-definition = #'((0 0.25 1 1)
+                                             (0.3 0.7 0.4 0.75)
+                                             (0.75 1.0 1.0 1.0))
+  c2 ~ c |
+  \tieSolid
+  c2 ~ c |
+}
+
+
+
+
+
+
index 0265b3deddeb5d8a94f4488c1bffb84de3dca00b..8e6e9c5a3364613eac45c2a216288d1d09421709 100644 (file)
@@ -153,6 +153,7 @@ SCM
 Arpeggio::brew_chord_slur (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
+  SCM dash_definition = me->get_property ("dash-definition");
   Interval heads = robust_scm2interval (me->get_property ("positions"),
                                        Interval())
     * Staff_symbol_referencer::staff_space (me);
@@ -165,7 +166,7 @@ Arpeggio::brew_chord_slur (SCM smob)
   Bezier curve = slur_shape (dy, height_limit, ratio);
   curve.rotate (M_PI / 2);
 
-  Stencil mol (Lookup::slur (curve, lt, lt, SCM_UNDEFINED));
+  Stencil mol (Lookup::slur (curve, lt, lt, dash_definition));
   mol.translate_axis (heads[LEFT], Y_AXIS);
   return mol.smobbed_copy ();
 }
@@ -211,5 +212,6 @@ ADD_INTERFACE (Arpeggio,
               "positions "
               "script-priority " // TODO: make around-note-interface
               "stems "
+               "dash-definition " // TODO: make apply to non-slur arpeggios
               );
 
index 8f55b3ce507efb8c2595dc8f65bcd0f3e16a0bf2..b341d73754b35ccf5828c9f2372ea65847e5878c 100644 (file)
@@ -269,26 +269,23 @@ Bezier::reverse ()
 
 /*
   Subdivide a bezier at T into LEFT_PART and RIGHT_PART
+  using deCasteljau's algorithm.
 */
 void
-Bezier::subdivide (Real t, Bezier &left_part, Bezier &right_part)
+Bezier::subdivide (Real t, Bezier *left_part, Bezier *right_part) const
 {
-  Offset b2[3];
-  Offset b1[2];
-  Offset b0;
-  for (int i = 0; i < 3; i++)
-    b2[i] = control_[i] + t * (control_[i+1] - control_[i]);
-  for (int i = 0; i < 2; i++)
-    b1[i] = b2[i] + t * (b2[i+1] - b2[i]);
-  b0 = b1[0] + t * (b1[1] - b1[0]);
-  left_part.control_[0] = control_[0];
-  left_part.control_[1] = b2[0];
-  left_part.control_[2] = b1[0];
-  left_part.control_[3] = b0;
-  right_part.control_[0] = b0;
-  right_part.control_[1] = b1[1];
-  right_part.control_[2] = b2[2];
-  right_part.control_[3] = control_[3];
+  Offset p[CONTROL_COUNT][CONTROL_COUNT];
+
+  for (int i = 0; i < CONTROL_COUNT ; i++)
+    p[i][CONTROL_COUNT - 1 ] = control_[i];
+  for (int j = CONTROL_COUNT - 2; j >= 0 ; j--)
+  for (int i = 0; i < CONTROL_COUNT -1; i++)
+    p[i][j] = p[i][j+1] + t * (p[i+1][j+1] - p[i][j+1]);
+  for (int i = 0; i < CONTROL_COUNT; i++)
+    {
+      left_part->control_[i]=p[0][CONTROL_COUNT - 1 - i];
+      right_part->control_[i]=p[i][i];
+    }
 }
 
 /*
@@ -296,25 +293,24 @@ Bezier::subdivide (Real t, Bezier &left_part, Bezier &right_part)
 */
 
 Bezier
-Bezier::extract (Real t_min, Real t_max)
+Bezier::extract (Real t_min, Real t_max) const
 {
+  if ((t_min < 0) || (t_max) > 1)
+    programming_error
+      ("bezier extract arguments outside of limits: curve may have bad shape");
+  if (t_min >= t_max)
+    programming_error 
+      ("lower bezier extract value not less than upper value: curve may have bad shape");
   Bezier bez1, bez2, bez3, bez4;
   if (t_min == 0.0)
-    {
-      for (int i = 0; i < CONTROL_COUNT; i++)
-        bez2.control_[i] = control_[i];
-    }
+    bez2 = *this;
   else
-    {
-      subdivide (t_min, bez1, bez2);
-    }
+      subdivide (t_min, &bez1, &bez2);
   if (t_max == 1.0)
-    {
       return bez2;
-    }
   else
    {
-     bez2.subdivide ((t_max-t_min)/(1-t_min), bez3, bez4);
+     bez2.subdivide ((t_max-t_min)/(1-t_min), &bez3, &bez4);
      return bez3;
   }
 }
index 5cfca578c2ebd5270095076cc91788adb6a3bd42..31f68d23e04055851511012e288bdb39d881ef87 100644 (file)
@@ -22,8 +22,8 @@ public:
   void reverse ();
   void rotate (Real);
   void translate (Offset);
-  void subdivide (Real, Bezier &, Bezier &);
-  Bezier extract (Real, Real);
+  void subdivide (Real, Bezier * , Bezier * ) const;
+  Bezier extract (Real, Real) const;
 
   Real get_other_coordinate (Axis a, Real x) const;
   vector<Real> solve_point (Axis, Real coordinate) const;
index f856fa5be931541b95a2a6e1828759826d8d7e2b..671c0da04e38e93c0e12f418f79bc9db92e9bcbd 100644 (file)
@@ -348,8 +348,9 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick,
 {
   Stencil return_value;
 
-  /* calculate the offset for the two beziers that make the sandwich
-   *   for the slur
+  /* 
+      calculate the offset for the two beziers that make the sandwich
+      for the slur
   */
   Real alpha = (curve.control_[3] - curve.control_[0]).arg ();
   Bezier back = curve;
@@ -360,22 +361,14 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick,
   curve.control_[1] -= perp;
   curve.control_[2] -= perp;
  
-/*  Bezier test1, test2, test3, test4;
-  test1 = back.extract(0., 1.0) ;
-  test2 = curve.extract (0., 1.0);
-  test3 = back.extract(0.0, 0.2);
-  test4 = curve.extract (0.0, 0.2);
-  return_value = bezier_sandwich (test1, test2, linethick);
-//  return_value.add_stencil (
-//      bezier_sandwich (test3, test4, linethick));
-  return return_value; */
-
-  if ((dash_details == SCM_UNDEFINED) || (dash_details == SCM_EOL))
-    { /* solid slur  */
+  if (!scm_is_pair (dash_details))
+    { 
+      /* solid slur  */
       return_value = bezier_sandwich (back, curve, linethick);
     }
   else
-    { /* dashed or combination slur */
+    { 
+      /* dashed or combination slur */
       int num_segments = scm_to_int (scm_length (dash_details));
       for (int i=0; i<num_segments; i++)
         {
@@ -389,11 +382,9 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick,
           Bezier back_segment = back.extract (t_min, t_max);
           Bezier curve_segment = curve.extract (t_min, t_max);
           if (dash_fraction == 1.0) 
-            {
               return_value.add_stencil (bezier_sandwich (back_segment,
                                                          curve_segment,
                                                          linethick));
-            }
           else
             {
               Bezier back_dash, curve_dash;
@@ -415,8 +406,8 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick,
                                                              linethick));
                 }
             }
-        }/* end for num_segments */
-    }/* end dashed or combination slur */
+        }
+    }
   return return_value;
 }
 
index 7b0553124a6449dc016305c4fbe604cedeff3840..7eea1c24d08597dce719e2578ac3a5893ea73470 100644 (file)
@@ -120,20 +120,10 @@ Slur::print (SCM smob)
   Stencil a;
 
   SCM dash_definition = me->get_property ("dash-definition");
-//  SCM p = me->get_property ("dash-period");
-//  SCM f = me->get_property ("dash-fraction");
-//  SCM interval = me->get_property ("dash-interval");
-//  if (scm_is_number (p) && scm_is_number (f))
-//    a = Lookup::dashed_slur (one, line_thick, robust_scm2double (p, 1.0),
-//                          robust_scm2double (f, 0));
-//  else
-    a = Lookup::slur (one,
-                     get_grob_direction (me) * base_thick,
-                     line_thick,
-                      dash_definition);
-//                      robust_scm2double (p, 1.0),
-//                      robust_scm2double (f, 0),
-//                      robust_scm2double (interval, 1));
+  a = Lookup::slur (one,
+                    get_grob_direction (me) * base_thick,
+                   line_thick,
+                    dash_definition);
 
 #if DEBUG_SLUR_SCORING
   SCM annotation = me->get_property ("annotation");
index 955076b6634c1500ef1cc3738aa50f324261d0c5..27033eaeaa1baca379388244104e8dd0cdf2dd92 100644 (file)
@@ -266,22 +266,10 @@ Tie::print (SCM smob)
   Stencil a;
 
   SCM dash_definition = me->get_property ("dash-definition");
-//  SCM p = me->get_property ("dash-period");
-//  SCM f = me->get_property ("dash-fraction");
-//  SCM interval = me->get_property ("dash-interval");
-//  if (scm_is_number (p) && scm_is_number (f))
-//    a = Lookup::dashed_slur (b,
-//                          line_thick,
-//                          robust_scm2double (p, 1.0),
-//                          robust_scm2double (f, 0));
-//  else
-    a = Lookup::slur (b,
-                     get_grob_direction (me) * base_thick,
-                     line_thick,
-                      dash_definition);
-//                      robust_scm2double (p, 1.0),
-//                      robust_scm2double (f, 0),
-//                      robust_scm2double (interval, 1.0));
+  a = Lookup::slur (b,
+                   get_grob_direction (me) * base_thick,
+                   line_thick,
+                    dash_definition);
 
 #if DEBUG_TIE_SCORING
   SCM annotation = me->get_property ("annotation");
@@ -321,8 +309,7 @@ ADD_INTERFACE (Tie,
               "annotation "
               "avoid-slur "    //  UGH.
               "control-points "
-              "dash-fraction "
-              "dash-period "
+               "dash-definition "
               "details "
               "direction "
               "head-direction "
index 184c317d76b7f72866b12a9499d73510f5a3e710..79ddd427c45fd9af49e62d9908eed983e4f371ee 100644 (file)
@@ -10,9 +10,19 @@ slurUp = \override Slur #'direction = #UP
 slurDown = \override Slur #'direction = #DOWN
 slurNeutral = \revert Slur #'direction
 
+#(define (make-simple-dash-definition dash-fraction dash-period)
+    (list (list 0 1 dash-fraction dash-period)))
+
 slurDashed = {
   \override Slur #'dash-definition =  #'((0 1 0.4 0.75))
 }
+slurDashPattern = 
+#(define-music-function (parser location dash-fraction dash-period)
+  (number? number?)
+  #{
+     \override Slur #'dash-definition =
+       $(make-simple-dash-definition dash-fraction dash-period)
+  #})
 slurDotted = {
   \override Slur #'dash-definition =  #'((0 1 0.1 0.75))
 }
@@ -36,6 +46,13 @@ phrasingSlurNeutral = \revert PhrasingSlur #'direction
 phrasingSlurDashed = {
   \override PhrasingSlur #'dash-definition =  #'((0 1 0.4 0.75))
 }
+phrasingSlurDashPattern = 
+#(define-music-function (parser location dash-fraction dash-period)
+  (number? number?)
+  #{
+     \override PhrasingSlur #'dash-definition =
+       $(make-simple-dash-definition dash-fraction dash-period)
+  #})
 phrasingSlurDotted = {
   \override PhrasingSlur #'dash-definition =  #'((0 1 0.1 0.75))
 }
@@ -75,16 +92,28 @@ tieDown = \override Tie #'direction = #DOWN
 tieNeutral = \revert Tie #'direction
 
 tieDashed = {
-  \override Tie #'dash-period = #0.75
-  \override Tie #'dash-fraction = #0.4
-}
+  \override Tie #'dash-definition = #'((0 1 0.4 0.75))
+}
+tieDashPattern = 
+#(define-music-function (parser location dash-fraction dash-period)
+  (number? number?)
+  #{
+     \override Tie #'dash-definition =
+       $(make-simple-dash-definition dash-fraction dash-period)
+  #})
 tieDotted = {
-  \override Tie #'dash-period = #0.75
-  \override Tie #'dash-fraction = #0.1
+  \override Tie #'dash-definition = #'((0 1 0.1 0.75))
+}
+tieHalfDashed = {
+  \override Tie #'dash-definition =  #'((0 0.5 0.4 0.75)
+                                        (0.5 1 1 1))
+}
+tieHalfSolid = {
+  \override Tie #'dash-definition =  #'((0 0.5 1 1)
+                                        (0.5 1 0.4 0.75))
 }
 tieSolid = {
-  \revert Tie #'dash-period
-  \revert Tie #'dash-fraction
+  \revert Tie #'dash-definition
 }
 
 easyHeadsOn = {
@@ -269,7 +298,8 @@ arpeggioArrowDown = {
 arpeggioNormal = {
   \revert Arpeggio #'stencil
   \revert Arpeggio #'X-extent
-  \revert Arpeggio  #'arpeggio-direction
+  \revert Arpeggio #'arpeggio-direction
+  \revert Arpeggio #'dash-definition
 }
 arpeggioBracket = {
   \revert Arpeggio #'X-extent
@@ -278,7 +308,15 @@ arpeggioBracket = {
 arpeggioParenthesis = {
   \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
   \override Arpeggio #'X-extent = #ly:grob::stencil-width
+  \revert Arpeggio #'dash-definition
 }
+arpeggioParenthesisDashed = {
+  \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
+  \override Arpeggio #'X-extent = #ly:grob::stencil-width
+  \override Arpeggio #'dash-definition = #'((0 1 0.4 0.75))
+}
+
+
 
 glissando = #(make-music 'GlissandoEvent)
 
index 96cb3ab4764738967a3af36bac1103783a27025a..7d97a417da9f38cc3d759f50436594c0b5dac420 100644 (file)
@@ -2900,7 +2900,8 @@ def conv(str):
         stderr_write (NOT_SMART % _("\\bar \".\" now produces a thick barline.\n"))
         stderr_write (UPDATE_MANUALLY)
     str = re.sub (r'ly:hairpin::after-line-breaking', r'ly:spanner::kill-zero-spanned-time', str)
-    if re.search(r'\'dash-fraction', str) or re.search(r'\'dash-period', str):
+    if re.search("(Slur|Tie)\w+#\'dash-fraction", str) \
+        or re.search("(Slur|Tie)\w+#\'dash-period", str):
         stderr_write ("\n")
         stderr_write (NOT_SMART % _("Dash parameters for slurs and ties are now in \'dash-details.\n"))
         stderr_write (UPDATE_MANUALLY)