lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Harp Pedal Spanners


From: Alexandre Loomis
Subject: Harp Pedal Spanners
Date: Tue, 6 Jun 2023 10:49:33 -0700

Hi all,

I'm trying to notate harp pedals. This should looks something like
mwe1.cropped.png
I currently have code where it's straightforward to get pretty close, like this
mwe2.cropped.png
However, making it look like the first image involves a ton of time starting the new spanner a 16 (or 32, or whatever gives good spacing) later, setting TextSpanner.staff-padding so that the new spanner lines up with the old one, and tweaking the whitespace around the accidentals to look somewhat balanced. Is there any way to make this more "automatic"?
My current code is

\version "2.24.0"

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
     \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
  >>
  \layout {}
}

Thanks,
Alex

reply via email to

[Prev in Thread] Current Thread [Next in Thread]