On 12/21/10 5:14 PM, "Michael Ellis" <michael.f.el...@gmail.com> wrote:

> On Tue, Dec 21, 2010 at 7:12 PM, Michael Ellis <michael.f.el...@gmail.com>
> wrote:
>> While working with a much larger version of the score below  (BWV 206 chorale
>> in 4 voices),  I tried using the NoteNames engraver to put note names under
>> each voice.  For some reason,  invoking it twice causes the clef and
>> instrument name to change on the top staff.  The notes (and the note names)
>> are correct, but the Soprano line gets a bass clef and the bass instrument
>> name.   Is this a known problem?

Mike,

The problem is apparently that the \clef command implicitly creates some
kind of staff context if it's in a NoteNames context.

If you take the \clef commands out of the music passed to the NoteNames
context, then things seem to work right.  (I haven't fully tested the
instrumentName to see if it can be part of the NoteNames context or not).

Here's some code that works:

\version "2.12.3"

Snotes = \relative c' {
  \time 4/4
  \partial 4
  a'4 |
  bes4 a g d' |
}

Bnotes = \relative c {
  \time 4/4
  \partial 4
  d4 |
  g4 a bes a8 g |
}

ASvoiceAA = {
  \set Staff.instrumentName = #"Soprano"
  \clef treble
  \key f \major
  \Snotes
}


ABvoiceDA = {
  \set Staff.instrumentName = #"Bass"
  \clef bass
  \key f \major
  \Bnotes
}


\score {
  <<
    \new Voice = ASVoiceAA  { \ASvoiceAA }
    \new NoteNames = NNS  {\Snotes}

    \new Voice = ABvoiceDA {\ABvoiceDA}
    \new NoteNames = NNB {\Bnotes}
  >>
}%% end of score-block


HTH,

Carl


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to