Jump to content

Changing the text for sustain markings: Difference between revisions

From LilyPond wiki
No edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<code>Staff.pedalSustainStrings</code> can be used to set the text used for pedal down and up. Note that the only valid strings are those found in the list of pedal glyphs - the values used this snippet constitute an exhaustive list.
With the <code>pedalSustainStrings</code> context property it is possible to set the text used for pedal down and up. Note that the only valid strings are those found in the list of pedal glyphs the values shown in this snippet constitute an exhaustive list.


<lilypond version="2.24">
<lilypond version="2.24">
Line 14: Line 14:
   \set Staff.pedalSustainStrings = #'("Ped" "*Ped" "*")
   \set Staff.pedalSustainStrings = #'("Ped" "*Ped" "*")
   \sustainNotes  
   \sustainNotes  
}
\layout {
  ragged-right = ##f
}
}
</lilypond>
</lilypond>


[[Category:Keyboards]]
[[Category:Tweaks and overrides]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Keyboards]]
[[Category:Snippet]]
[[Category:Tweaks and overrides]][[Category:Snippet]]

Latest revision as of 13:39, 13 December 2025

With the pedalSustainStrings context property it is possible to set the text used for pedal down and up. Note that the only valid strings are those found in the list of pedal glyphs – the values shown in this snippet constitute an exhaustive list.

\version "2.24"

sustainNotes = { c4\sustainOn d e\sustainOff\sustainOn f\sustainOff }

\relative c' {
  \sustainNotes 
  \set Staff.pedalSustainStrings = #'("P" "P-" "-")
  \sustainNotes 
  \set Staff.pedalSustainStrings = #'("d" "de" "e")
  \sustainNotes 
  \set Staff.pedalSustainStrings = #'("M" "M-" "-")
  \sustainNotes 
  \set Staff.pedalSustainStrings = #'("Ped" "*Ped" "*")
  \sustainNotes 
}

\layout {
  ragged-right = ##f
}