lilypond-user
[Top][All Lists]
Advanced

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

Re: Lyric line's vertical position is shifting from one staff system to


From: Kieren MacMillan
Subject: Re: Lyric line's vertical position is shifting from one staff system to the next.
Date: Thu, 31 May 2018 21:49:30 -0400

Hi David,

> May I ask for some advice?

That’s what this list is for!

> I would like to have a single line staff that is grouped with other staffs, 
> which I use to display chords and lyrics into rows above and below the line.

Does the modified snippet (below) do what you want?
n.b. I was only worried about fixing the lyric position, not the barline 
clashes.

Hope this helps!
Kieren.

%%%  SNIPPET BEGINS
melody = \relative c' {

      \clef "alto"
      \hide Staff.Clef
      \key c \major
      \time 4/4

      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c

}

"text1" = \lyricmode {
      Here the lyric lines are in the right
      position because both lines are present.
      When the top lyric line is only "\skip1",
      the bottom line shifts up.
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      And, the bar lines are clashing with
      several words when the top staff is
      by itself.
}

"text2" = \lyricmode {
      A B C D
      A B C D
      A B C D
      A B C D
      A B C D
      A B C D
      A B C D
      A B C D
      A B C D
      A B C D
      A B C D
      A B C D
      A B C D
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1
      \skip1 \skip1 \skip1 \skip1

}

upper = \relative c'' {
      \clef treble
      \key c \major
      \time 4/4

      | c c c c
      | c c c c
      | c c c c
      %Shift staff spacing.
      | c' c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      %Shift staff spacing again.
      | c' c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c
      | c c c c

}

lower = \relative c {
      \clef bass
      \key c \major
      \time 4/4

      c4 c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c
      c c c c

}

\layout {
  \context {
    \Lyrics
    \override LyricText.self-alignment-X = #LEFT
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
        #'((basic-distance . 0) (minimum-distance . 0 ) (padding . -2.5) 
(stretchability . 0))
  }
}

\score {

      \new StaffGroup <<
            \new Staff = "ChordsAndLyrics" \with {
                  \override StaffSymbol.line-positions = #'( 0 )
                  \override BarLine.bar-extent = #' (0 . 2.5)
                  \override StaffSymbol.Y-extent = #'(0 . 2.5)
            }
            <<
                  \new Voice = "mel1" { \hideNotes \melody }
                  \new Lyrics \with {
                       alignAboveContext = "ChordsAndLyrics"
                        \textLengthOn
                  } \lyricsto "mel1" \"text1"
                  \new Lyrics \with {
                        \override 
VerticalAxisGroup.nonstaff-relatedstaff-spacing =
                            #'((basic-distance . 0) (minimum-distance . 0 ) 
(padding . -2.5) (stretchability . 0))
                        alignBelowContext = "ChordsAndLyrics"
                  } \lyricsto "mel1" \"text2"
            >>
            \new Staff = "upper" \upper
            \new Staff = "lower" \lower
      >>

}
%%%  SNIPPET ENDS
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden




reply via email to

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