Dynamics spanner with custom text: Difference between revisions
Appearance
No edit summary |
m New category Tags: Mobile edit Mobile web edit |
||
| Line 27: | Line 27: | ||
[[Category:Expressive marks]] | [[Category:Expressive marks]] | ||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category:Included in the official documentation]][[Category:Snippet]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Revision as of 23:19, 21 November 2025
Postfix functions for custom crescendo text spanners. The spanners should start on the first note of the measure. One has to use -\mycresc, otherwise the spanner start will rather be assigned to the next note.
\version "2.24"
% Two functions for (de)crescendo spanners where you can explicitly
% give the spanner text.
mycresc =
#(define-music-function (mymarkup) (markup?)
(make-music 'CrescendoEvent
'span-direction START
'span-type 'text
'span-text mymarkup))
mydecresc =
#(define-music-function (mymarkup) (markup?)
(make-music 'DecrescendoEvent
'span-direction START
'span-type 'text
'span-text mymarkup))
\relative c' {
c4-\mycresc "custom cresc" c4 c4 c4 |
c4 c4 c4 c4 |
c4-\mydecresc "custom decresc" c4 c4 c4 |
c4 c4\! c4 c4
}