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: Jakob Pedersen
Subject: Re: Aligning articulations/pedal marks vertically
Date: Sun, 23 Apr 2023 08:42:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Betterbird/102.10.0

Thank you.

This works perfectly. I had a feeling it would be a rather involved solution that I would never have been able to figure out myself. I had to tweak a fermata that got moved, but a single tweak certainly beats tweaking each pedal mark!

I suppose it's one of those time when insisting on something that goes against LilyPond's standards and "best practice" becomes rather complicated. I'm sure I'm not the first to discover that leaning back and just accepting what is produced (unless it's plain erroneous obviously) is by far the easiest.

I have attached the score in case anyone would like to see a chorale from the Danish hymnal with pedal marks for a struggling organ student.

Best wishes,
Jakob

On 22.04.2023 00.21, Jean Abou Samra wrote:

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: Op-min-sjæl-thi-sol-er-oppe.ly
Description: Text Data


reply via email to

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