lilypond-user
[Top][All Lists]
Advanced

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

Re: Re: Putting lyrics below its staff?


From: Kaj Persson
Subject: Re: Re: Putting lyrics below its staff?
Date: Fri, 22 May 2015 01:23:08 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


On 2015-05-21 15:30, tisimst wrote:
Kaj,

On Thu, May 21, 2015 at 2:05 AM, Kaj [via Lilypond] <[hidden email]> wrote:
I am working on a piece of choir music. It consists of two parts, the first of which is written on one staff, and the second two staves. The upper staff in part two is a continuation of the staff in part one. All the staves are accompanied with lyrics. My wish is that this lyrics should be written below its respective staff. However, whatever I do, the lyrics for the lower staff in part two, which I denote C, is written above the staff, hence directly below the lyrics for the upper staff (B). I suspect there should be a simple solution for this, and in the handbook they say that the lyrics is normally written below the staff. To get it above the staff you would have to do some overrides.

In the code you can see the commented lines, which are part of all the tries I have done, but nothing seems to help. To me it almost looks as if the behaviour is hard coded, just because of putting the lyrics between the staves is the normal. After an experience like this I feel strengthened in a thought, grown in my head, that LilyPond will never ever be a tool for everybody. It is too complicated and inconsistent to be used by anybody else than the absolute top expert. Which is a pity, as it produces an excellent result.

This is the result of my efforts so far:

\version "2.18.2"

\paper { ragged-right = ##t }

mA = \relative c' { c4 d e f }
mB = \relative c'' { g4 a b c }
mC = \relative c' { c'4 b a8 g f4 }
mAB = \relative c' { c4 d e f g4 a b c }

tA = \lyricmode { A B C D }
tB = \lyricmode { E F G H }
tC = \lyricmode { i j k l m }
tAB = \lyricmode { A B C D E F G H }

xA = { s1*1 \break }
xB = { s1*1 }
xC = { s1*1 }

\score {
  \new ChoirStaff
  <<
    \new Staff = "sAB" {
      <<
        \new Voice = "vAB" { \mAB }
        {
          \new Voice = "vA" { \xA }
          <<
            \new Voice = "vB" { \xB }
            \new Staff = "sC" {
              \new Voice = "vC" { \mC }
            }
          >>
        }
      >>
    }
    \new Lyrics = "lAB" \lyricsto "vAB" { \tAB }
    \new Lyrics = "lC" \with {
%     alignBelowContext = #"sC"
%     \override VerticalAxisGroup #'staff-affinity = #UP
    }
    { \lyricsto "vC" { \tC } }
  >>
 
  \layout { indent = #0 }
}


which produces this:

/Kaj

I think LilyPond is just getting confused by all the nested voices/staves. As Phil suggested, a little restructuring of your example score can bring a nice solution to light:

\version "2.18.2"

mA = \relative c' { 
  c4 d e f | \break 
  g a b c 
}
mB = \relative c'' { 
  s1 | 
  c4 b a8 g f4 
}
tA = \lyricmode { A B C D E F G H }
tB = \lyricmode { i j k l m }

\score {
  \new ChoirStaff <<
    \new Staff {
      \new Voice = "vA" \mA
    }
    \new Lyrics \lyricsto "vA" \tA
    \new Staff \with {
      \RemoveEmptyStaves
      \override VerticalAxisGroup.remove-first = ##t
    }{
      \new Voice = "vB" \mB
    }
    \new Lyrics \lyricsto "vB" \tB
  >>
  \layout {
    indent = 0
  }
}

There are a few things I'd point out:
  1. All \new Staff declarations are only within the ChoirStaff
  2. Each staff gets its own voice and the second voice gets a spacer rest before its notes.
  3. The second staff's empty measures are removed via two overrides \RemoveEmptyStaves and \override VerticalAxisGroup.remove-first = ##t
  4. Each set of Lyrics is placed immediately after its staff so there is no need to direct it above or below anything
I hope that this provides a clearer logic to how to construct a score that is quite obvious to what's happening (to the user) and relatively mistake-proof in interpretation (for LilyPond).

Regards,
Abraham


View this message in context: Re: Putting lyrics below its staff?
Sent from the User mailing list archive at Nabble.com.

Phil and Abraham

Thank you for your comments, and for the example showing a solution to my problem. At least it solves this much simplified example. However I get an impression it being a "fix" for just this, so I made an, a wee more complicated, but never the less much realistic example. Sorry, of course it will occupy a lot of valuable space on this mailing list, but to illustrate my thought I see no other way to go. It shows a case with several regions with note systems containing more than one staff, but with regions between them with just one staff. Generally there could of course also be a base system with a number of staves, more than one, which is expanded with excess staves. It follows a quite simple algorithm, inspired from the description of ossia staves (NR 1.6.2). At every place, where an extra staff is wanted, you include a "\new Staff" command inside marks for simultanous music (<< >>). The top staff in all systems is however one single, though broken at special positions. This is obvious from the observation that only the new staves get a time signature as, for the top staff, no change is done. By removing the \break in the music definitions, mA..mD, one can clearly see, that it in fact is one single sequence of measures.

The example shows, that LilyPond perfectly understands the implied structure and it also understands which lyric belongs to which note. So that is not the problem. A minor issue is that the lyrics for the top staff is broken into separate lines, one for each individual "\new Lyrics". This can certainly be solved by a clever definition of the string for this staff (and maybe every staff). But the main issue is, that at least I have not found any method to put the text below the respective staff, exept for the top staff, despite this would be the normal behaviour according to the manual.  And that was my wish by calling for assistance on this mailing list.

Here is the new example:

\version "2.18.2"

% The next line does not belong to the task, but
% just to get shorter music lines in the printout.
\paper { ragged-right = ##t }

% Music definitions, mA..mD for the  top staff:
mA = \relative c' { c4 c c c \break }
mB = \relative c' { d4 d d d \break }
mC = \relative c' { e4 e e e \break }
mD = \relative c' { f4 f f f \break }

mE = \relative c''' { g4 g g g }
mF = \relative c''' { a4 a a a }
mG = \relative c''' { b4 b b b }

% Lyrics for each part of the staves:
tA = \lyricmode { A A A A }
tB = \lyricmode { B B B B }
tC = \lyricmode { C C C C }
tD = \lyricmode { D D D D }
tE = \lyricmode { E E E E }
tF = \lyricmode { F F F F }
tG = \lyricmode { G G G G }

\score {
  \new ChoirStaff
  <<
    {
      \new Staff = "sAB" {
        <<
          {
            <<
              \new Voice = "vA" { \mA }
            >>
            <<
              \new Voice = "vB" { \mB }
              \new Staff = "sB" {
                \new Voice = "vE" { \mE }
              }
            >>
            <<
              \new Voice = "vC" { \mC }
            >>
            <<
              \new Voice = "vD" { \mD }
              \new Staff = "sF" <<
                \new Voice = "vF" { \mF }
              >>
              \new Staff = "sG" <<
                \new Voice = "vG" { \mG }
              >>
            >>
          }
        >>
      }
    }
      \new Lyrics = "lA" \lyricsto "vA" { \tA }
      \new Lyrics = "lB" \lyricsto "vB" { \tB }
      \new Lyrics = "lC" \lyricsto "vC" { \tC }
      \new Lyrics = "lD" \lyricsto "vD" { \tD }
      \new Lyrics = "lE" \lyricsto "vE" { \tE }
      \new Lyrics = "lF" \lyricsto "vF" { \tF }
      \new Lyrics = "lG" \lyricsto "vG" { \tG }
  >>
 
  \layout { indent = #0 }
}



/Kaj



reply via email to

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