Dynamics spanner with custom text (2): 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 |
mNo edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Custom text spanners can be defined and used with hairpin and text crescendos. <code>\ | Custom text spanners can be defined and used with hairpin and text crescendos. <code>\<</code> and <code>\></code> produce hairpins by default, <code>\cresc</code>, etc., produce text spanners by default. | ||
<lilypond version="2.24"> | <lilypond version="2.24"> | ||
| Line 10: | Line 10: | ||
\relative c' { | \relative c' { | ||
c4\cresc | c4\cresc d e f | | ||
g4 | g4 a\! b\crpoco c | | ||
c4 d e f | | |||
g4 | c,4 d e f | | ||
g4\dim | g4 a\! b\< c | | ||
g4\dim a b c | | |||
g4\decresc a b c | | |||
g4 a b c\! | | |||
} | } | ||
</lilypond> | </lilypond> | ||
| Line 20: | Line 23: | ||
[[Category:Expressive marks]] | [[Category:Expressive marks]] | ||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category: | [[Category:Snippet]] | ||
Latest revision as of 12:23, 9 December 2025
Custom text spanners can be defined and used with hairpin and text crescendos. \< and \> produce hairpins by default, \cresc, etc., produce text spanners by default.
\version "2.24"
% Some sample text dynamic spanners, to be used as postfix operators
crpoco =
#(make-music 'CrescendoEvent
'span-direction START
'span-type 'text
'span-text "cresc. poco a poco")
\relative c' {
c4\cresc d e f |
g4 a\! b\crpoco c |
c4 d e f |
c,4 d e f |
g4 a\! b\< c |
g4\dim a b c |
g4\decresc a b c |
g4 a b c\! |
}