2

could someone help me with my problem, please?

I have got this Lilypond 2.18.2 code:

\version "2.18.2"
\language "deutsch"

global = {
  \time 4/4
  \set Timing.beamExceptions = #'()
  \set Timing.baseMoment = #(ly:make-moment 1/8)
  \set Timing.beatStructure = #'(2 2 1 1 2)
}

melody = \relative c' {
  \global
   r4 r r8 d d d
}

accRight = \relative c' {
  \global
  r8 <h d g> <h d g> <h d g> <h d g> r r4

}

accLeft = \relative c {
  \global
  g4 g' g, g'
}

verseOne = \lyricmode {
  a a a  
}

verseTwo = \lyricmode {
  b b b 
}
choirOne = \lyricmode {
  (a a a a)
}
choirTwo = \lyricmode {
  (b b b b)
}


\score {
  <<
    \new ChoirStaff <<
      \new Staff <<
        \new Voice { \voiceOne \melody }
        \addlyrics { \verseOne }
        \addlyrics { \verseTwo }
        \new Voice { \voiceTwo \accRight }
        \addlyrics { \choirOne }
        \addlyrics { \choirTwo }
      >>
      \new Staff { \clef bass \accLeft }
    >>
  >>
}

It looks like this:

excerpt

And now I want to have all a's in lyrics in the first line and all b's in the second line, but do nothing with notes. Like this (done with Windows Paint):

goal

Somehow put the lyrics on the rests, but keep the rests here. I have already tried multiple solution, but none of them have worked with multiple stanzas. Could you help me, please? I do not need midi, only the sheet.

  • @VitHenych I propose an even better solution using NullVoice, see the answer. Also note that q is a short-cut for the last chord entered using the <...> notation, so <h d g> q d q is the same as <h d g> <h d g> d <h d g>. It eases the coding :-) – yo' Feb 8 '18 at 13:04
3

You can combine two voices into a single NullVoice and then add lyrics to this:

\version "2.18.2"
\language "deutsch"

global = {
  \time 4/4
  \set Timing.beamExceptions = #'()
  \set Timing.baseMoment = #(ly:make-moment 1/8)
  \set Timing.beatStructure = #'(2 2 1 1 2)
}

melody = \relative d' {
  \global
   r4 r r8 d d d
}

accRight = \relative h {
  \global
  r8 <h d g> q q q r r4
}

accLeft = \relative g, {
  \global
  g4 g' g, g'
}

%verseOne = \lyricmode { a a a }
%verseTwo = \lyricmode { b b b }
%choirOne = \lyricmode { (a a a a) }
%choirTwo = \lyricmode { (b b b b) }
alltextOne = \lyricmode { (a a a a) a a a }
alltextTwo = \lyricmode { (b b b b) b b b }

\score {
  <<
    \new ChoirStaff <<
      \new Staff <<
        \new Voice { \voiceOne \melody }
        \new Voice { \voiceTwo \accRight }
        \new NullVoice = "allvoice" << \melody \accRight >>
      >>
      \new Lyrics \lyricsto "allvoice" { \alltextOne }
      \new Lyrics \lyricsto "allvoice" { \alltextTwo }
      \new Staff { \clef bass \accLeft }
    >>
  >>
}

enter image description here


If this option fails, you can:

  • fill in the NullVoice manually (Example A below),
  • enter manual durations for your lyrics (this, however, gives a bad visual output) (Example B below), or
  • keep all the music in one voice and all the rests in another one and keep switching using \voiceOne and \voiceTwo (Example C below).

Example A

\version "2.18.2"
\language "deutsch"

global = {
  \time 4/4
  \set Timing.beamExceptions = #'()
  \set Timing.baseMoment = #(ly:make-moment 1/8)
  \set Timing.beatStructure = #'(2 2 1 1 2)
}

melody = \relative d' {
  \global
   r4 r r8 d d d
}

accRight = \relative h {
  \global
  r8 <h d g> q q q r r4
}

accLeft = \relative g, {
  \global
  g4 g' g, g'
}

textRhythm = { r8 c c c c c c c }
alltextOne = \lyricmode { (a a a a) a a a }
alltextTwo = \lyricmode { (b b b b) b b b }

\score {
  <<
    \new ChoirStaff <<
      \new Staff <<
        \new Voice { \voiceOne \melody }
        \new Voice { \voiceTwo \accRight }
        \new NullVoice = "allvoice" { \textRhythm }
      >>
      \new Lyrics \lyricsto "allvoice" { \alltextOne }
      \new Lyrics \lyricsto "allvoice" { \alltextTwo }
      \new Staff { \clef bass \accLeft }
    >>
  >>
}

Example B

\version "2.18.2"
\language "deutsch"

global = {
  \time 4/4
  \set Timing.beamExceptions = #'()
  \set Timing.baseMoment = #(ly:make-moment 1/8)
  \set Timing.beatStructure = #'(2 2 1 1 2)
}

melody = \relative d' {
  \global
   r4 r r8 d d d
}

accRight = \relative h {
  \global
  r8 <h d g> q q q r r4
}

accLeft = \relative g, {
  \global
  g4 g' g, g'
}

alltextOne = \lyricmode { \skip8 (a8 a8 a8 a)8 a8 a8 a8 }
alltextTwo = \lyricmode { \skip8 (b8 b8 b8 b)8 b8 b8 b8 }

\score {
  <<
    \new ChoirStaff <<
      \new Staff <<
        \new Voice { \voiceOne \melody }
        \new Voice { \voiceTwo \accRight }
      >>
      \new Lyrics { \alltextOne }
      \new Lyrics { \alltextTwo }
      \new Staff { \clef bass \accLeft }
    >>
  >>
}

Example C

\version "2.18.2"
\language "deutsch"

global = {
  \time 4/4
  \set Timing.beamExceptions = #'()
  \set Timing.baseMoment = #(ly:make-moment 1/8)
  \set Timing.beatStructure = #'(2 2 1 1 2)
}

musicMusic = \relative d' {
  \global
  \voiceTwo r8 <h d g> q q q \voiceOne d d d
}

musicRests = {
    \global
    \voiceOne r4 r r8 \voiceTwo r8 r4
}

accLeft = \relative g, {
  \global
  g4 g' g, g'
}

alltextOne = \lyricmode { (a a a a) a a a }
alltextTwo = \lyricmode { (b b b b) b b b }

\score {
  <<
    \new ChoirStaff <<
      \new Staff <<
        \new Voice = "musicvoice" { \voiceOne \musicMusic }
        \new Voice = "restsvoice" { \voiceTwo \musicRests }
      >>
      \new Lyrics \lyricsto "musicvoice" { \alltextOne }
      \new Lyrics \lyricsto "musicvoice" { \alltextTwo }
      \new Staff { \clef bass \accLeft }
    >>
  >>
}
  • Thanks. It really helped. I have already used option B, which is for this piece fine, because almost everything is here in the length of quaver. But I like the other possibilities too. I will use them in another songs. – Vit Henych Feb 9 '18 at 12:27
3

This answer was a good answer, but I also found in the lilypond documentation that you can add markup to rests quite easily http://lilypond.org/doc/v2.18/Documentation/notation/writing-rests

This is the particular snippet I found useful. (you don't have to compress the rests, the \textLengthOn (then off) command will make the measure fit the preceding markup text.

\relative c' {
  \compressFullBarRests
  \textLengthOn
  ^\markup { [MAJOR GENERAL] }
  R1*19
  _\markup { \italic { Cue: ... it is yours } }
  ^\markup { A }
  R1*30^\markup { [MABEL] }
  \textLengthOff
  c4^\markup { CHORUS } d f c
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.