Making slurs with complex dash structure: Difference between revisions
Appearance
No edit summary |
Revise description |
||
| (One intermediate revision by the same user not shown) | |||
| 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) | ||
} | } | ||
| Line 20: | Line 20: | ||
[[Category:Rhythms]] | [[Category:Rhythms]] | ||
[[Category:Expressive marks]] | [[Category:Expressive marks]] | ||
[[Category:Included in the official documentation]][[Category:Snippet]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 11:57, 30 November 2025
Slurs can be composed of complex dash patterns by setting the dash-definition 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 t, 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 (start-t stop-t dash-fraction dash-period). In the segment spanning the range start-t to stop-t, the dash pattern is defined by the values of dash-fraction and dash-period. dash-fraction specifies how much of a dash period is black; if set to 1 you get a solid slur segment. The unit for dash-period is staff spaces.
\version "2.24"
\relative c' {
\once \override
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)
\once \override
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)
}