Piano “half sustain pedal” indications: Difference between revisions

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 5: Line 5:
Under the covers, this works by representing sustain half on/half off as Una Corda pedal events. The logic temporarily changes the rendering of Una Corda pedals when you call <code>sustainHalfOn</code>, and changes it back when you call <code>sustainHalfOff</code>. We also temporarily change the value of <code>Staff.unaCordaPedalStyle</code> to match the value of <code>Staff.sustainPedalStyle</code> for the duration of the half sustain event so that the intended sustain pedal style will be used.
Under the covers, this works by representing sustain half on/half off as Una Corda pedal events. The logic temporarily changes the rendering of Una Corda pedals when you call <code>sustainHalfOn</code>, and changes it back when you call <code>sustainHalfOff</code>. We also temporarily change the value of <code>Staff.unaCordaPedalStyle</code> to match the value of <code>Staff.sustainPedalStyle</code> for the duration of the half sustain event so that the intended sustain pedal style will be used.


<lilypond version="2.24.0">
<lilypond version="2.24">
%% This snippet defines functions that enable "1/2" pedal indications
%% This snippet defines functions that enable "1/2" pedal indications
%% to be used.  Using this is quite easy, just add \sustainHalfOn
%% to be used.  Using this is quite easy, just add \sustainHalfOn