Making slurs with complex dash structure: Difference between revisions
m New category Tags: Mobile edit Mobile web edit |
Revise description |
||
| Line 1: | Line 1: | ||
Slurs can be | Slurs can be composed of complex dash patterns by setting the <code>dash-definition</code> property, which is a list of slur segments, which in turn are lists of parameters setting up the dash behavior of the given segment. | ||
Slur segments are defined in terms of the Bézier parameter <var>t</var>, which ranges from 0 at the left end of the slur to 1 at the right end of the slur. A slur segment has the form <code>(<var>start-t</var> <var>stop-t</var> <var>dash-fraction</var> <var>dash-period</var>)</code>. In the segment spanning the range <var>start-t</var> to <var>stop-t</var>, the dash pattern is defined by the values of <var>dash-fraction</var> and <var>dash-period</var>. <var>dash-fraction</var> specifies how much of a dash period is black; if set to 1 you get a solid slur segment. The unit for <var>dash-period</var> is staff spaces. | |||
<lilypond version="2.24"> | <lilypond version="2.24"> | ||
\relative c' { | \relative c' { | ||
\once \override | \once \override | ||
Slur.dash-definition = #'((0 0.3 0.1 0.75) | Slur.dash-definition = #'(( 0 0.3 0.1 0.75) | ||
(0.3 0.6 1 1 ) | |||
(0.65 1.0 0.4 0.75)) | |||
c4( d e f) | c4( d e f) | ||
\once \override | \once \override | ||
Slur.dash-definition = #'((0 0.25 1 1) | Slur.dash-definition = #'((0 0.25 1 1 ) | ||
(0.3 0.7 0.4 0.75) | |||
(0.75 1.0 1 1 )) | |||
c4( d e f) | c4( d e f) | ||
} | } | ||