Piano “half sustain pedal” indications: Difference between revisions
m New category Tags: Mobile edit Mobile web edit |
m Formatting |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
When playing the piano, there a quite a few songs that require you to only press the sustain pedal half way (or even a quarter of the way in some cases). | When playing the piano, there a quite a few songs that require you to only press the sustain pedal half way (or even a quarter of the way in some cases). | ||
There is currently not a way to show these indications on the generated music in an intuitive way. This snippet provides functions that allow you to easily do this. | |||
There is currently not a way to show these indications on the generated music in an intuitive way. This snippet provides functions that allow you to easily do this. | |||
The implementation is quite complicated, but basically there are two music functions that get defined, <code>sustainHalfOn</code> and <code>sustainHalfOff</code>. You can use these just like you would normally use <code>sustainOn</code> and <code>sustainOff</code>. You can use any of the sustain pedal styles, and everything will work as expected. You do need to add an explicit call to <code>sustainHalfOff</code> when you want the half pedal to end. Calling <code>sustainOn</code> does not automatically turn off <code>sustainHalfOn</code>. | The implementation is quite complicated, but basically there are two music functions that get defined, <code>sustainHalfOn</code> and <code>sustainHalfOff</code>. You can use these just like you would normally use <code>sustainOn</code> and <code>sustainOff</code>. You can use any of the sustain pedal styles, and everything will work as expected. You do need to add an explicit call to <code>sustainHalfOff</code> when you want the half pedal to end. Calling <code>sustainOn</code> does not automatically turn off <code>sustainHalfOn</code>. | ||
| Line 106: | Line 108: | ||
\new Staff { | \new Staff { | ||
\set Staff.pedalSustainStyle = #'mixed | \set Staff.pedalSustainStyle = #'mixed | ||
\sustainHalfOn | \sustainHalfOn | ||
b'16 c' d' e' | b'16 c' d' e' | ||
| Line 118: | Line 118: | ||
a' a' | a' a' | ||
\sustainOn | \sustainOn | ||
a' | a' a' | ||
\sustainOff\sustainOn | \sustainOff\sustainOn | ||
a' a' a' a' | a' a' a' a' | ||
\sustainOff | \sustainOff | ||