2

I am making a music book where each song is on its own page. The code for each song is:

title = ...
music = ...
\bookpart {
  \header {
    title = \title
  }
  \score {
    \music
    \layout { }
  }
}

I have a special case where I want to put two songs on one page, because they are actually the same song, only in two different melodies. It should look like this:

Ideal output, with separate titles, lyrics only once, and notes aligned in both melodies

Maybe someone can help me achieve this output?


Here is the code I wrote for that special page:

title = "Es war eine Mutter"
\bookpart {
  \header {
    title = \title
    piece = "offical version"
  }
  
  % official version
  \score {
    \relative
    {
      \numericTimeSignature
      \time 3/4
      \repeat volta 2 { c'4 f f g a a f g g e f f }
    }  
    \addlyrics {
      Es war ei -- ne Mut -- ter, die hat -- te vier Kin -- der:
    }
    \addlyrics {
      Den Früh -- ling, den Som -- mer, den Herbst und den Win -- ter.
    }
    \layout { }
  }
  
  % Jane's version
  \score {
    \relative
    {
      \numericTimeSignature
      \time 3/4
      \repeat volta 2 { c'4 f f a g g a e e g f f }
    }  
    \addlyrics {
      Es war ei -- ne Mut -- ter, die hat -- te vier Kin -- der:
    }
    \addlyrics {
      Den Früh -- ling, den Som -- mer, den Herbst und den Win -- ter.
    }
  }
}

which gives this output:

Output with identical piece titles and lyrics included twice

This has two issues:

  1. I don't want lyrics below the second version. But if I remove them, the notes will not align with the first version any more (they come closer together). But I want to keep the alignment.

  2. I don't know how to set a different piece name for the second version. Since I am inside a \bookpart, I cannot use a \header block inside the second \score block to set a local piece name.


I also tried a different approach: Putting both melodies into the same score.

\bookpart {
  \header {
    title = \title
    piece = "official Version"
  }
  \score {
    <<
    % official version
    \new Staff 
    \relative
    {
      \numericTimeSignature
      \time 3/4
      \repeat volta 2 { c'4 f f g a a f g g e f f }
    }  
    \addlyrics {
      Es war ei -- ne Mut -- ter, die hat -- te vier Kin -- der:
    }
    \addlyrics {
      \override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing.padding = #5
      Den Früh -- ling, den Som -- mer, den Herbst und den Win -- ter.
    }
    % Jane's version
    \new Staff 
    \relative
    {
      \numericTimeSignature
      \time 3/4
      \repeat volta 2 { c'4 f f a g g a e e g f f }
    }
    >>
    \layout { }
  }
}

This gave me the following output:

Output appears as two instruments in single score with only one title

which again has issues, namely:

  1. There's the connection bar (or whatever it is called) between both melodies. I don't want that, since it suggests to play both melodies simultaneously.
  2. I don't know how to set a piece name for the second version at all, since it is just the same \score.
3
  • 3
    I still ought to keep my mouth shut because it's irrelevant to this question as well... but the first note really needs to be a pickup. Sep 30 at 21:02
  • I would question the desire to not print lyrics with the second melody. It's always hard to look at one part of the page for pitches and elsewhere for lyrics. This seems to be a well-known German children's song, so perhaps those familiar with it would know them by heart, but I certainly don't. Sep 30 at 21:05
  • @AndyBonner There is no "elsewhere" to look - the images I attached contain all notes and all text of the song (except other stanzas). Since the second version is just below the lyrics, the amout of eye movement when playing either version should be roughly the same. I'd agree with you if I had a larger piece, but not for a one-liner. (Side note: I want to save precious space; the pages in my book are quite small an there should be as much space as possible for a picture. It's going to be a song book for a 3-year-old, and since he can't read, he will use pictures as identifiers for the songs.)
    – Kjara
    Oct 1 at 10:43
3

Different piece names for each score

\Score blocks can have their own \header block. Remove piece = from the outer header block, and add a header block at the beginning of each \score:

\header { piece = "Appropriate Title" }


Removing lyrics, but retaining note alignment

To remove the lyrics from the alternate melody, add

\layout { \hide LyricText }

at the end of the corresponding \Score block.

3
  • Have you tried your code? As I said: "Since I am inside a \bookpart, I cannot use a \header block inside the second \score block to set a local piece name.". I tried that, but it gave a compile error. See lilypond.org/doc/v2.23/Documentation/notation/… ("\header blocks may be placed [...] Within a \bookpart block but outside all \score blocks within that bookpart."). Still +1 for the hidden lyrics.
    – Kjara
    Oct 1 at 10:29
  • @Kjara Yes, I ran the code without error and double-checked by running it again just now. The bullet point immediately after the one you quoted says that a \header may be placed "within a \score block". (I used the first full version of your code and modified that.)
    – Aaron
    Oct 1 at 12:33
  • I don't know what I did there. I got compilation errors whenever I put a header block inside the score block (that's why I interpreted the quoted text so that inside bookpart, it is forbidden to have any header block inside score), but I don't get them now. Never mind!
    – Kjara
    Oct 1 at 18:22

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.