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: 70147persson
Subject: Re: Re: Putting lyrics below its staff?
Date: Fri, 22 May 2015 18:03:58 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


On 2015-05-22 02:18, Carl Sorensen wrote:

On 5/21/15 5:23 PM, "Kaj Persson" <address@hidden> wrote:
   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 }
                     >>
                   >>
                 }
               >>
             }
           }
You must put the Lyrics contexts in parallel with the Staff where you want
the lyrics to be aligned.


             \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 }
       }
       

Actually, if you want the A, B, C, D lyrics to be aligned on the same
horizontal line, you should probably just make them one lyrics context,
associated with one Voice context, but both can have multiple sequential
music expressions.


\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  }
mB =relative c' { d4 d d d }
mC =relative c' { e4 e e e }
mD =relative c' { f4 f f f }

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
                <<
                  \mB
                  \new Staff =sB" {
                    \new Voice =vE" { \mE }
                  }
                  \new Lyrics =IE" \lyricsto "vE"{\tE}
                >>
                \mC

                <<
                  \mD
                  \new Staff =sF" {
                    \new Voice =vF" { \mF }
                  }
                  \new Lyrics =lF" \lyricsto "vF" { \tF }
                  \new Staff =sG" {
                    \new Voice =vG" { \mG }
                  }
                  \new Lyrics =lF" \lyricsto "vF" { \tF }
                >>
              }
              }
            >>
       
          }
      }
        >>
     
      \new Lyrics =lA" \lyricsto "vA" { \tA  \tB \tC \tD}
  >>
  
  \layout { indent =0 }
}


Hope this is helpful,


Carl


Hi Carl!

Yes, you are the person with the big understanding. I learned t from your solution, that you can, and in this case must, do things inside open parenthesis. That was what was wrong in my efforts towards the solution. So I took your solution as a base and worked through my example. It all was fine. I was a wee wondering about the extra gap between top staff and the ones below, so I went on and added a couple of measures an staves. And the result is clear: the new staff will always start one step below the extra one to the left, even if there are single measures in the top staff in between. Do you have a smart solution to this too?

When looking at the code I discovered that I had forgotten all the \lyricsto's, but it worked fine never the less. Well, completion and a new try, but what!? Now the measure 3, after the double staves, was empty, and measure 4 was distorted. It was clear that one could not use \lyricsto if measures following the doubled staves. I checked also with the expanded system described above, and the conclusion was clear. The measures direct after a multi-staff part was distorted. And ALL the \lyricsto has to be removed for a good result.

It very much looked like a bug, and I began to think of how to formulate it. But so, I got a thought, to test also in another version of LilyPond. I am normally running in the stable version 2.18.2. So a new session, now in 2.19.20, and the error was gone. The bug is already fixed, and the code corrected. From this I assume, that you too are running some 2.19.xx-version, since you had not discovered this error.

Well, I am glad that you showed me, that LilyPond is a robust programme, and it understands these structures without being confused. And also that my own understanding is increased a bit. If you put breaks before the extra staves it works perfect, and no problem with the gaps as seen here.

For completeness I include my own final code. I does not deviate much from yours, mostly just a couple of not necessary parenthesis.

Thank you again.

/Kaj

\version "2.19.20"

% 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  }
mB = \relative c' { d4 d d d }
mC = \relative c' { e4 e e e }
mD = \relative c' { f4 f f f }
% 4 f f f }}

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 }

% Extra
mX = \relative c'' { c4 c c c }
mY = \relative c'' { d4 d d d }
mZ = \relative c'' { e4 e e e }
tX = \lyricmode { X X X X }
tY = \lyricmode { Y Y Y Y }
tZ = \lyricmode { Z Z Z Z }

\score {
  \new ChoirStaff
  <<
    \new Staff = "sABCD" {
      \new Voice = "vABCD" {
        \mA
        <<
          \mB
          \new Staff = "sE" {
            \new Voice = "vE" { \mE }
          }
          \new Lyrics = "lE" \lyricsto "vE" { \tE }
        >>                    
        \mC
        <<
          \mD
          \new Staff = "sF" {
            \new Voice = "vF" { \mF }
          }
          \new Lyrics = "lF" \lyricsto "vF" { \tF }
          \new Staff = "sG" {
            \new Voice = "vG" { \mG }
          }
          \new Lyrics = "lG" \lyricsto "vG" { \tG }
        >>
       
        \mX
        <<
          \mY
          \new Staff = "sZ" {
            \new Voice = "vZ" { \mZ }
          }
          \new Lyrics = "lZ" \lyricsto "vZ" { \tZ }
        >>
       
      }
    }
    \new Lyrics = "lABCD" \lyricsto "vABCD" { \tA \tB \tC \tD \tX \tY }
  >>
 
  \layout { }
}





reply via email to

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