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.nales...@gmail.com>
wrote:

> Hi Stéphane,
>
> On Wed, Jun 2, 2021 at 8:02 AM Stéphane SOPPERA <
> stephane.sopp...@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:
>> [image: 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:
>> [image: 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