Slanted parentheses around dynamics: Difference between revisions
Appearance
m Jean Abou Samra moved page Creating “real” parenthesized dynamics to Slanted parentheses around dynamics |
Conform to the format of snippets included in the official documentation |
||
| Line 1: | Line 1: | ||
The easiest way to parenthesize dynamics is to use the normal <code>\parenthesize</code> command and adjust the font size, e.g., <code>{ c'4\tweak Parentheses.font-size 2 \parenthesize \f }</code>. However, this results in upright parentheses, while dynamic marks are normally slanted. This snippet gives a method to make the parentheses slanted as well. | |||
<lilypond version="2.24"> | <lilypond version="2.24"> | ||
| Line 17: | Line 15: | ||
c4\paren\f c c \dynamicUp c\paren\p | c4\paren\f c c \dynamicUp c\paren\p | ||
} | } | ||
</lilypond> | </lilypond> | ||
Latest revision as of 18:38, 1 February 2026
The easiest way to parenthesize dynamics is to use the normal \parenthesize command and adjust the font size, e.g., { c'4\tweak Parentheses.font-size 2 \parenthesize \f }. However, this results in upright parentheses, while dynamic marks are normally slanted. This snippet gives a method to make the parentheses slanted as well.
\version "2.24"
paren =
#(define-event-function (dyn) (ly:event?)
(make-dynamic-script
#{ \markup \concat {
\normal-text \italic \fontsize #2 (
\pad-x #0.2 #(ly:music-property dyn 'text)
\normal-text \italic \fontsize #2 )
}
#}))
\relative c'' {
c4\paren\f c c \dynamicUp c\paren\p
}