lilypond-user
[Top][All Lists]
Advanced

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

Re: Aligning articulations/pedal marks vertically


From: Jean Abou Samra
Subject: Re: Aligning articulations/pedal marks vertically
Date: Sat, 22 Apr 2023 00:21:30 +0200
User-agent: Evolution 3.46.4 (3.46.4-1.fc37)

Le vendredi 21 avril 2023 à 20:27 +0200, Jakob Pedersen a écrit :

Greetings!

First time poster, long time (basic) lilypond user.

I'm writing a hymn/chorale setting for organ. It's a basic piano staff with two voice for each staff, and lyrics above system aligned with the soprano line.

I've added pedal marks, which looks something like this:

I think that's a little clumsy looking. I would prefer the pedal marks to be aligned, like this:

(I aligned these by editing the PDF in Inkscape, which is entirely unsatisfactory of course!)

I've tried aligning them with tweaks, but that a bit fiddly and not particularly accurate.

Is there a more elegant solution to aligning the pedal marks?

Perhaps try a callback like this:


\version "2.24.1"
\language "deutsch"

\score {
  \new PianoStaff <<
    \new Staff = "venstre" <<
      \clef bass
      \new Voice = "tenor" {
        \voiceOne << \relative c' {
          \key d \major \time 4/4 a h e, a } >>
      }
      \new Voice = "bas" { 
        \voiceTwo << \relative c {
          \key d \major \time 4/4
          \override Script.Y-offset =
            #(lambda (grob)
               (+ -6.0 (ly:self-alignment-interface::y-aligned-on-self grob)))
          \override Script.self-alignment-Y = #CENTER
          d\rtoe h\lheel a\ltoe a
      } >> }
    >>
  >>
}

Y-offset sets the absolute position relative to the staff, and the self-alignment-interface correction is to align the centers of the scripts together (otherwise it aligns their reference points).

You will need to adjust the 6.0 value to your liking.

Best,

Jean

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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