Hi Samanth(a),

I'm producing a bassline score, with chords, notes and lyrics.

As the bassline notes are ... sparse, I'm trying to use a NullVoice to hold the rhythm and aligning the lyrics to that (I gather this is an approach used by others)

Despite much googling/reading of docs/internals/snippets/etc I'm totally failing to prevent a staff appearing for the NullVoice.

I'm fairly new to Lilypond and am still trying to wrap my head around contexts/grobs/etc and would be grateful for any advice as to how to resolve this issue.

I've attached a cutdown .ly and the pdf it produces.

Don't worry, it'll all become clear soon enough. And you hit a comparatively subtle point: Since you're not creating a Staff context explicitly, you're relying on LilyPond to create staves automatically, and it seems a new Voice (or NullVoice) causes a new Staff to be created.

Replacing your

\score {
  {
...

by

\score {
  \new Staff {
...

already does the trick.

In general, I would not recommend adding multiple sections of simultaneous music << ... >> one after another to make up a piece. Most often, it's more convenient to construct a _complete_ bass music variable (which of course may be comprised of multiple sections defined independently), similarly for the other voices, and then combine them in a << ... >> expression.

So (pseudocode), I prefer

\score {
  <<
    \new Staff \firstInstrument
    \new Staff \secondInstrument
  >>
}

with

firstInstrument = {
  \firstInstrumentIntro
  \firstInstrumentVerse
}

etc.

Lukas


Reply via email to