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
@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
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
@code{\slurNeutral},
@code{\slurDashed},
@code{\slurDotted},
-@code{\slurHaldDashed},
+@code{\slurHalfDashed},
@code{\slurHalfSolid},
+@code{\slurDashPattern},
@code{\slurSolid}.
@endpredefined
@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
@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:
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},
@code{\phrasingSlurNeutral},
@code{\phrasingSlurDashed},
@code{\phrasingSlurDotted},
+@code{\phrasingSlurHalfDashed},
+@code{\phrasingSlurHalfSolid},
+@code{\phrasingSlurDashPattern},
@code{\phrasingSlurSolid}.
@endpredefined
@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}.
@funindex arpeggioBracket
@funindex \arpeggioParenthesis
@funindex arpeggioParenthesis
+@funindex \arpeggioParenthesisDashed
+@funindex arpeggioParenthesisDashed
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}.
@code{\arpeggioArrowDown},
@code{\arpeggioNormal},
@code{\arpeggioBracket},
-@code{\arpeggioParenthesis}.
+@code{\arpeggioParenthesis}
+@code{\arpeggioParenthesisDashed}.
@endpredefined
@rglos{arpeggio}.
Notation Reference:
+@ref{Slurs},
@ref{Ties}.
Snippets:
Internals Reference:
@rinternals{Arpeggio},
+@rinternals{Slur},
@rinternals{PianoStaff}.
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
@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},
@code{\tieNeutral},
@code{\tieDotted},
@code{\tieDashed},
+@code{\tieDashPattern},
+@code{\tieHalfDashed},
+@code{\tieHalfSolid},
@code{\tieSolid}.
@endpredefined
@rglos{tie},
@rglos{laissez vibrer}.
-Notation Reference: @ref{Automatic note splitting}.
+Notation Reference:
+@ref{Slurs},
+@ref{Automatic note splitting}.
Snippets:
@rlsr{Rhythms}.
-\version "2.12.0"
+\version "2.13.1"
\header { texidoc = "
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\) |
-\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.
"
\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) |
}
--- /dev/null
+\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 |
+}
+
+
+
+
+
+
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);
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 ();
}
"positions "
"script-priority " // TODO: make around-note-interface
"stems "
+ "dash-definition " // TODO: make apply to non-slur arpeggios
);
/*
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];
+ }
}
/*
*/
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;
}
}
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;
{
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;
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++)
{
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;
linethick));
}
}
- }/* end for num_segments */
- }/* end dashed or combination slur */
+ }
+ }
return return_value;
}
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");
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");
"annotation "
"avoid-slur " // UGH.
"control-points "
- "dash-fraction "
- "dash-period "
+ "dash-definition "
"details "
"direction "
"head-direction "
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))
}
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))
}
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 = {
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
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)
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)