Thanks, that was very helpful! Adding \tweak padding 1 to the original
function and defining a continue function by
nextPed =
#(define-music-function (end-text) (markup?)
#{
\tweak bound-details.left.padding -3
\startPed "" #end-text
#})
makes many cases work or almost work by default. It still requires some
tweaking, but far less.
Alex
On Tue, Jun 6, 2023 at 1:53 PM Kieren MacMillan <[email protected]>
wrote:
> Hi Alexandre,
>
> > I'm trying to notate harp pedals
>
> It would be great to have more complete/robust harp pedal support in
> Lilypond!
>
> > Is there any way to make this more "automatic"?
>
> Unfortunately, I believe TextSpanner still doesn’t implement shorten-pair…
> but you can always use padding to fake it:
>
> startPed =
> #(define-music-function (start-text end-text) (markup? markup?)
> #{
> \tweak dash-fraction #1.0
> \tweak bound-details.left.text #start-text
> \tweak bound-details.left.stencil-align-dir-y #CENTER
> \tweak font-shape #'upright
> \tweak bound-details.right.text #end-text
> \tweak bound-details.right.stencil-align-dir-y #CENTER
> \tweak bound-details.left-broken.text ##f
> \tweak bound-details.right-broken.text ##f
> \tweak bound-details.right.padding 4
> \tweak padding 1
> \startTextSpan
> #})
>
> endPed = \stopTextSpan
>
> RH = \relative es'' {
> ces'16 gis f gis des8 r a'16 ges es ges d8 r |
> }
>
> Pedals = {
> s4_\startPed "G♯" " ♭" s s \endPed _\startPed "" "♮" s4 \endPed _"D♮" |
> }
>
> \score {
> \new Staff <<
> \new Voice \RH
> \new Voice \Pedals
> >>
> }
>
> Maybe Someone™ will have a more automatic and flexible method, but maybe
> this gives you a hint in the right direction?
>
> Best,
> Kieren.
> ______________________________________________
>
> My work day may look different than your work day. Please do not feel
> obligated to read or respond to this email outside of your normal working
> hours.
>
>