Shape individual ties in chords: Difference between revisions
Appearance
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series |
m Make output look good in LilyPond PDF documentation, too, avoiding bad page breaks |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
To shape individual ties in chords use the method demonstrated below. | To shape individual ties in chords use the method demonstrated below. | ||
<lilypond version="2.24" | <lilypond version="2.24" > | ||
{ | |||
\textMark "Chords can be tied note by note." | |||
\ | <c'~ e'~ g'~ c''~>2 q | ||
} | } | ||
{ | { | ||
\textMark \markup \override #'(baseline-skip . 3) \wordwrap { | |||
Modifying those ties with \typewriter "\\shape" does not succeed, | |||
because \typewriter TieColumn positions them on its own behalf, | |||
ignoring \typewriter "\\shape" input more or less. You may | |||
circumvent this by setting \typewriter positioning-done to | |||
\typewriter "#t" – alas, \typewriter positioning-done is an | |||
internal property, and setting it to \typewriter "#t" means: all | |||
positioning is done, don’t do anything further. The next example | |||
demonstrates a case where the positioning is not finished: all tie | |||
directions are down, and the thickness is not accurate. | |||
} | |||
<c'~ e'~ g'~ c''~>2 | <c'~ e'~ g'~ c''~>2 | ||
\once \override TieColumn.positioning-done = ##t | \once \override TieColumn.positioning-done = ##t | ||
q | q | ||
} | } | ||
{ | { | ||
\textMark "To fix that, enter ties with explicit direction modifiers." | |||
<c'_~ e'_~ g'_~ c''^~>2 | <c'_~ e'_~ g'_~ c''^~>2 | ||
\once \override TieColumn.positioning-done = ##t | \once \override TieColumn.positioning-done = ##t | ||
q | q | ||
} | } | ||
{ | { | ||
<c'-\shape #'((0 . 0) (0 . -10) (0 . -10) (0 . 0)) _~ | \textMark \markup { | ||
e'-\shape #'((0 . 0) (0 . -5) (0 . -5) (0 . 0)) _~ | Now you can use \typewriter "\\shape" for each tie as usual. } | ||
g'-\shape #'((0 . 0) (0 . -2) (0 . -2) (0 . 0)) _~ | <c'-\shape #'((0 . 0) (0 . -10) (0 . -10) (0 . 0)) _~ | ||
e'-\shape #'((0 . 0) (0 . -5) (0 . -5) (0 . 0)) _~ | |||
g'-\shape #'((0 . 0) (0 . -2) (0 . -2) (0 . 0)) _~ | |||
c''-\shape #'((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ^~ | c''-\shape #'((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ^~ | ||
>2 | >2 | ||
| Line 43: | Line 42: | ||
q | q | ||
} | } | ||
{ | { | ||
<c'-\shape #'(((0 . 0) (0 . -10) (0 . -10) (0 . 0)) | \textMark "This also works at line breaks." | ||
((0 . 0) (0 . -10) (0 . -10) (0 . 0))) | <c'-\shape #'(((0 . 0) (0 . -10) (0 . -10) (0 . 0)) | ||
((0 . 0) (0 . -10) (0 . -10) (0 . 0))) _~ | |||
e'-\shape #'(((0 . 0) (0 . -5) (0 . -5) (0 . 0)) | e'-\shape #'(((0 . 0) (0 . -5) (0 . -5) (0 . 0)) | ||
((0 . 0) (0 . -5) (0 . -5) (0 . 0))) | ((0 . 0) (0 . -5) (0 . -5) (0 . 0))) _~ | ||
g'-\shape #'(((0 . 0) (0 . -2) (0 . -2) (0 . 0)) | |||
g'-\shape #'(((0 . 0) (0 . -2) (0 . -2) (0 . 0)) | ((0 . 0) (0 . -2) (0 . -2) (0 . 0))) _~ | ||
((0 . 0) (0 . -2) (0 . -2) (0 . 0))) | c''-\shape #'(((0 . 0) (0 . 5) (0 . 5) (0 . 0)) | ||
((0 . 0) (0 . 5) (0 . 5) (0 . 0))) ^~ | |||
c''-\shape #'(((0 . 0) (0 . 5) (0 . 5) (0 . 0)) | |||
((0 . 0) (0 . 5) (0 . 5) (0 . 0))) | |||
>2 | >2 | ||
\break | \break | ||
| Line 64: | Line 58: | ||
q | q | ||
} | } | ||
{ | { | ||
\textMark \markup { | |||
It also works with the \typewriter tieWaitForNote property. } | |||
\set tieWaitForNote = ##t | \set tieWaitForNote = ##t | ||
c'4-\shape #'((0 . 0) (0 . -10) (0 . -10) (0 . 0)) _~ | c'4-\shape #'((0 . 0) (0 . -10) (0 . -10) (0 . 0)) _~ | ||
e'-\shape #'((0 . 0) (0 . -5) (0 . -5) (0 . 0)) _~ | e'-\shape #'((0 . 0) (0 . -5) (0 . -5) (0 . 0)) _~ | ||
g'-\shape #'((0 . 0) (0 . -2) (0 . -2) (0 . 0)) _~ | g'-\shape #'((0 . 0) (0 . -2) (0 . -2) (0 . 0)) _~ | ||
c''-\shape #'((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ^~ | c''-\shape #'((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ^~ | ||
\once \override TieColumn.positioning-done = ##t | \once \override TieColumn.positioning-done = ##t | ||
<c' e' g' c''>1 | <c' e' g' c''>1 | ||
} | |||
\layout { | |||
indent = 0 | |||
\context { | |||
\Score | |||
\override TextMark.padding = #4 | |||
\override TextMark.break-align-symbols = #'(left-edge) | |||
} | |||
} | |||
\paper { | |||
score-system-spacing.padding = 3 | |||
} | } | ||
</lilypond> | </lilypond> | ||
| Line 81: | Line 88: | ||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 06:14, 11 December 2025
To shape individual ties in chords use the method demonstrated below.
\version "2.24"
{
\textMark "Chords can be tied note by note."
<c'~ e'~ g'~ c''~>2 q
}
{
\textMark \markup \override #'(baseline-skip . 3) \wordwrap {
Modifying those ties with \typewriter "\\shape" does not succeed,
because \typewriter TieColumn positions them on its own behalf,
ignoring \typewriter "\\shape" input more or less. You may
circumvent this by setting \typewriter positioning-done to
\typewriter "#t" – alas, \typewriter positioning-done is an
internal property, and setting it to \typewriter "#t" means: all
positioning is done, don’t do anything further. The next example
demonstrates a case where the positioning is not finished: all tie
directions are down, and the thickness is not accurate.
}
<c'~ e'~ g'~ c''~>2
\once \override TieColumn.positioning-done = ##t
q
}
{
\textMark "To fix that, enter ties with explicit direction modifiers."
<c'_~ e'_~ g'_~ c''^~>2
\once \override TieColumn.positioning-done = ##t
q
}
{
\textMark \markup {
Now you can use \typewriter "\\shape" for each tie as usual. }
<c'-\shape #'((0 . 0) (0 . -10) (0 . -10) (0 . 0)) _~
e'-\shape #'((0 . 0) (0 . -5) (0 . -5) (0 . 0)) _~
g'-\shape #'((0 . 0) (0 . -2) (0 . -2) (0 . 0)) _~
c''-\shape #'((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ^~
>2
\once \override TieColumn.positioning-done = ##t
q
}
{
\textMark "This also works at line breaks."
<c'-\shape #'(((0 . 0) (0 . -10) (0 . -10) (0 . 0))
((0 . 0) (0 . -10) (0 . -10) (0 . 0))) _~
e'-\shape #'(((0 . 0) (0 . -5) (0 . -5) (0 . 0))
((0 . 0) (0 . -5) (0 . -5) (0 . 0))) _~
g'-\shape #'(((0 . 0) (0 . -2) (0 . -2) (0 . 0))
((0 . 0) (0 . -2) (0 . -2) (0 . 0))) _~
c''-\shape #'(((0 . 0) (0 . 5) (0 . 5) (0 . 0))
((0 . 0) (0 . 5) (0 . 5) (0 . 0))) ^~
>2
\break
\once \override TieColumn.positioning-done = ##t
q
}
{
\textMark \markup {
It also works with the \typewriter tieWaitForNote property. }
\set tieWaitForNote = ##t
c'4-\shape #'((0 . 0) (0 . -10) (0 . -10) (0 . 0)) _~
e'-\shape #'((0 . 0) (0 . -5) (0 . -5) (0 . 0)) _~
g'-\shape #'((0 . 0) (0 . -2) (0 . -2) (0 . 0)) _~
c''-\shape #'((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ^~
\once \override TieColumn.positioning-done = ##t
<c' e' g' c''>1
}
\layout {
indent = 0
\context {
\Score
\override TextMark.padding = #4
\override TextMark.break-align-symbols = #'(left-edge)
}
}
\paper {
score-system-spacing.padding = 3
}