Jump to content

Changing text and spanner styles for text dynamics: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
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
Line 3: Line 3:
The style of the spanner line can be changed by modifying the <code>'style</code> property of <code>DynamicTextSpanner</code>. The default value is <code>'dashed-line</code>, and other possible values include <code>'line</code>, <code>'dotted-line</code> and <code>'none</code>.
The style of the spanner line can be changed by modifying the <code>'style</code> property of <code>DynamicTextSpanner</code>. The default value is <code>'dashed-line</code>, and other possible values include <code>'line</code>, <code>'dotted-line</code> and <code>'none</code>.


<lilypond version="2.24.0">
<lilypond version="2.24">
\relative c'' {
\relative c'' {
   \set crescendoText = \markup { \italic { cresc. poco } }
   \set crescendoText = \markup { \italic { cresc. poco } }

Revision as of 18:46, 16 November 2025

The text used for crescendos and decrescendos can be changed by modifying the context properties crescendoText and decrescendoText.

The style of the spanner line can be changed by modifying the 'style property of DynamicTextSpanner. The default value is 'dashed-line, and other possible values include 'line, 'dotted-line and 'none.

\version "2.24"

\relative c'' {
  \set crescendoText = \markup { \italic { cresc. poco } }
  \set crescendoSpanner = #'text
  \override DynamicTextSpanner.style = #'dotted-line
  a2\< a
  a2 a
  a2 a
  a2 a\mf
}