Slanted parentheses around dynamics: Difference between revisions

mNo edit summary
Conform to the format of snippets included in the official documentation
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Although the easiest way to add parentheses to a dynamic mark is to use a <code>\markup</code> block, this method has a downside: the created objects behave like text markups and not like dynamics.
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.
 
However, it is possible to create a similar object using the equivalent Scheme code (as described in the Notation Reference), combined with the <code>make-dynamic-script</code> function. This way, the markup is regarded as a dynamic and therefore remains compatible with commands such as <code>\dynamicUp</code> or <code>\dynamicDown</code>.


<lilypond version="2.24">
<lilypond version="2.24">