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
@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 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:
@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)
+g4\( e c2\)
\phrasingSlurHalfSolid
-c4( e g2)
+c4\( e g2\)
\phrasingSlurSolid
-g4( e c2)
+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)
+g4\( e c2\)
\phrasingSlurDashPattern #0.5 #2.0
-c4( e g2)
+c4\( e g2\)
\phrasingSlurSolid
-g4( e c2)
+g4\( e c2\)
@end lilypond
Dash pattern definitions for phrasing slurs have the same structure
@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}.
@code{\tieDotted},
@code{\tieDashed},
@code{\tieDashPattern},
-@code(\tieHalfDashed),
-@code{\tieHalfSolid),
+@code{\tieHalfDashed},
+@code{\tieHalfSolid},
@code{\tieSolid}.
@endpredefined
\version "2.13.1"
-\header{
+\header {
texidoc = "
Slurs can be made with complex dash patterns by defining
the @code{dash-definition} property. @code{dash-definition}
set to 1 for a solid slur.
"
doctitle = "Making slurs with complex dash structure"
+
+ lsrtags = "rhythms, expressive"
}
\relative 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
);
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 p[CONTROL_COUNT][CONTROL_COUNT];
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];
+ 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;
- 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;
}
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)