Hi everyone,

May I ask for some advice?

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. I am using the following tweak on each lyric line, where 'y' is adjusted:

                        \override LyricText.extra-offset = #'(0 . y)
                        \override LyricExtender.extra-offset = #'(0 . y)
                        \override LyricHyphen.extra-offset = #'(0 . y)

to accomplish this for each lyric line. However, in my attempts, the chords and lyrics shift from one staff system to the next. If I cause one row of lyrics to disappear over and entire system using the '\skip1' command, then the other lyric lines shift up or down. This requires me to do lots of tweaking and adjusting of the vertical spacing over most of the staff systems that appear on each page.

The spacing between staffs has also affected the lyric spacing in some of my attempts to get this working. However, it does not seem to be happening in my example snippet.

I am wondering, is there a way to set up lyric lines so that they are rigidly placed in relation to a staff and do not interact with other lyric lines or other staff spacing? Can I add code that ensures that if another lyric line disappears (or reappears), any remaining lyric lines will then stay in the same rigid relationship to the staff?

Also, some of the chords and lyrics are running into the bar lines as can be seen at the end of the example snippet. I am trying to figure out why this sometimes happens. Are there ways to ensure that this does not happen. I am using the command:

                        \textLengthOn

I hope my explanation or example snippet is not too ugly or long to make my point.

I would appreciate any help or advice. And, thank you for this wonderful software!


Peace,

David


Example snippet:

%START OF CODE

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

}

\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 {
                        \override LyricText.extra-offset = #'(0 . 6.3)
                        \override LyricExtender.extra-offset = #'(0 . 6.3)
                        \override LyricHyphen.extra-offset = #'(0 . 6.3)
                        \override LyricText.self-alignment-X = #LEFT
                        \textLengthOn
                  } \lyricsto "mel1" \"text1"

                  \new Lyrics \with {
                        \override LyricText.extra-offset = #'(0 . 6.2)
                        \override LyricExtender.extra-offset = #'(0 . 6.2)
                        \override LyricHyphen.extra-offset = #'(0 . 6.2)
                  } \lyricsto "mel1" \"text2"
            >>

            \new Staff = "upper" \upper
            \new Staff = "lower" \lower
      >>

}

%END OF CODE


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to