Piano “half sustain pedal” indications: Difference between revisions
Import snippet from LSR |
m Lemzwerg moved page Piano "Half Sustain Pedal" Indications to Piano “half sustain pedal” indications without leaving a redirect: Only the first letter of a title should be uppercase |
||
| (3 intermediate revisions by 2 users not shown) | |||
| 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 | <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 | ||
| Line 142: | Line 142: | ||
[[Category:Workaround]] | [[Category:Workaround]] | ||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category:Snippet]] | |||