On Sun 10 Nov 2024 at 10:48:15 (-0800), Walt North wrote:
> Typically I use variables for reuse to create one sheet for piano and
> one sheet for rhythm guitar. I would hide the staff from guitar player
> with nullvoice (saving paper space). The lyrics are aligned with the
> melody the piano sees.
> 
> In this case I'm using single staff polyphony for a section for the
> piano. What is happening is the nullvoice is not applying to the
> polyphonic notes.
> 
> Do I need to put the polyphonic notes in a completely separate
> variable in order to not have them passed to the nullvoice (that is
> only pass the main melody notes to the nullvoice)?

AIUI what's happening now is that \test is passed to NullVoice,
and so it doesn't appear in the output. However, there's a \new
Voice inside \test, and LP doesn't have anywhere to pass it, so
it instantiates a Staff for it, and prints it.

If you put the new voice into a variable, like:

  polly = \new Voice {
    \voiceTwo \magnifyMusic 0.8
      {
      r8 e e e e e e e |
    }
  }

you would still need to defer polly's interpretation, so
that \test only expands it when \test is passed to Staff
(1st score), or NullVoice (2nd score).

Then, before you create your second score, you can set:
  polly = { }
to make it "disappear". (I don't know the jargon.)

Does that make sense?

Cheers,
David.

Reply via email to