Parenthesize crescendo and decrescendo spanners: 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 |
No edit summary |
||
| Line 38: | Line 38: | ||
[[Category:Expressive marks]] | [[Category:Expressive marks]] | ||
[[Category:Editorial annotations]] | [[Category:Editorial annotations]] | ||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]][[Category:Snippet]] | ||
Revision as of 22:57, 21 November 2025
Parenthesize crescendo and decrescendo spanners.
\version "2.24"
%% http://lsr.di.unimi.it/LSR/Item?id=1097
%% => http://lilypond-french-users.1298960.n2.nabble.com/cresc-entre-parentheses-td7587993.html
% Version "2.19" and higher: dam = #(define-event-function () () etc.
\paper { tagline = ##f }
parC = #(define-event-function () ()
#{
\tweak bound-details.left.text \markup\concat { \lower #.1 "(" "cresc." }
\tweak bound-details.left.attach-dir #-2
\tweak bound-details.right-broken.text ##f
\tweak bound-details.left-broken.text ##f
\tweak bound-details.right.text \markup\lower #.5 " )"
\tweak bound-details.right.attach-dir # .5
\cresc
#})
parD = #(define-event-function () ()
#{
\tweak bound-details.left.text \markup\concat { \lower #.1 "(" "decresc." }
\tweak bound-details.left.attach-dir #-2
\tweak bound-details.right-broken.text ##f
\tweak bound-details.left-broken.text ##f
\tweak bound-details.right.text \markup\lower #.5 " )"
\tweak bound-details.right.attach-dir #.5
\decresc
#})
%% Test:
{ c'1*10 \cresc \break s1*5 c'1\! c'1*5 \decresc \break s1*10 c'1\! \bar "." }
{ c'1*10 \parC \break s1*5 c'1\! c'1*5 \parD \break s1*10 c'1\! \bar "." }