lilypond-user
[Top][All Lists]
Advanced

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

Re: Automatic offset to align texts on their baseline.


From: Stéphane SOPPERA
Subject: Re: Automatic offset to align texts on their baseline.
Date: Wed, 2 Jun 2021 17:34:20 +0200

Thanks David!

I did not know I could use any markup with lyrics and somehow failed to see that with \lyricmode I can specify a duration for each lyric item.
Thanks a lot!

I just did one small adjustment to your proposal:
<<
  \new Staff \relative {
    c'4 r <e g>2 | r4 d2 r4 | e1 |
  }
  \new Lyrics \with {
    \override LyricText.self-alignment-X = #LEFT    
  }
\lyricmode {
    \markup { \degree-text I {6 4 -3} } 1 |
    \markup { \degree-text VII {2} } |
    \markup { \degree-text III {} } |
  }
>>


Lyrics are centered on the note by default but this looks a bit odd for the analysis text and I prefer them aligned left (as the text attached to notes are by default).

Thanks again for your help,
Stéphane

On Wed, Jun 2, 2021 at 3:14 PM David Nalesnik <david.nalesnik@gmail.com> wrote:
Hi Stéphane,

On Wed, Jun 2, 2021 at 8:02 AM Stéphane SOPPERA <stephane.soppera@gmail.com> wrote:
Hi,

This is my first post here and I hope this question has not already been answered.

I want to add harmonic analysis under my scores, something like that:
Screenshot from 2021-06-02 14-55-24.png
To achieve that I have used the script at the bottom of this mail. Something I had to do to align those texts properly though is:
  \new Dynamics \with {
    \override TextScript.Y-offset = #-3
  }


Without this override, I get this result:
Screenshot from 2021-06-02 14-55-06.png

Is there any way to have automatic alignment without having to use Y-offset override?


Yes, instead of adding your analysis to a Dynamics context, use Lyrics:

<<
  \new Staff \relative {
    c'1 | d | e |
  }
  \new Lyrics \lyricmode {
    \markup { \degree-text I {6 4 -3} }1 |
    \markup { \degree-text VII {2} } |
    \markup { \degree-text III {} } |
  }
>>

Best,
David
 

reply via email to

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