lilypond-user
[Top][All Lists]
Advanced

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

Re: devnull with lyrics and ties


From: Vaughan McAlley
Subject: Re: devnull with lyrics and ties
Date: Sat, 21 Sep 2024 12:27:18 +1000

On Sat, 21 Sept 2024 at 10:20, Walt North <waltnorth@gmail.com> wrote:

Thanks, that took care of the alignment. 

However now I see an empty staff.  Is it expected I would then have to remove all empty staves?  I tried that but may not have it right


\version "2.24.2"

\language "english"

\layout {
  indent = 0
  \context {
    \NullVoice
    \RemoveAllEmptyStaves
  }
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }

  >>



}



On 9/20/2024 4:58 PM, Saul Tobin wrote:

My understanding is that Devnull is not intended for alignment of lyrics because it does not have the necessary engraver to create the invisible grobs used for alignment. It appears to me in your example that actually the lyrics are just being spaced evenly without alignment to anything. Nullvoice is intended for your use case.


On Fri, Sep 20, 2024, 6:06 PM Walt North <waltnorth@gmail.com> wrote:

Am I missing something?  It seems like using devnull to align lyrics to does pay attention to ties.  Ties do seem to be honored when using voice for alignment.

Below is a stripped down example with screenshot.

\version "2.24.2"

\language "english"

\layout {
  indent = 0
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new Devnull  = "verseB" { \break  \verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}



A good rule of thumb is when in doubt, explicitly instantiate Staves:

\version "2.24.2"

\language "english"

\layout {
  indent = 0
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  \new Staff
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}

Vaughan

 

reply via email to

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