[Top][All Lists]

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

Re: Change_iterator refuses to move a NullVoice into a Staff

From: Colin Campbell
Subject: Re: Change_iterator refuses to move a NullVoice into a Staff
Date: Tue, 4 Apr 2017 20:57:11 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 2017-04-04 07:54 PM, Dan Eble wrote:
On Mar 25, 2017, at 14:34, Dan Eble <address@hidden> wrote:
NullVoice is unlike a Voice in this respect: trying to move it to a
different Staff with \change fails with this warning:

    Change_iterator::process (): NullVoice = `soprano':
    cannot change `Staff' to `S': not changing to same context type: Staff

Staff "S" doesn't have a NullVoice defined. I modified your code as follows, and it seems to do what you want, although you still get a warning because the \changeStaff event happens in both a regular Voice and a NullVoice.b Perhaps others can take it further?


\version "2.19.54" %% just because it's what I'm using

sopranoNotes = \fixed c' {
  c1 d e f
  \change Staff = "S"
  g a b c'

\new ChoirStaff \with {
*% \RemoveEmptyStaves**
** % \override VerticalAxisGroup.remove-first = ##t*
} <<

  \new Staff = "S" \with {
    instrumentName = "S"
    shortInstrumentName = "S"
*  \new NullVoice = "S" {*
    $(skip-of-length sopranoNotes)

  \new Staff = "SA" \with {
    instrumentName = "SA"
    shortInstrumentName = "SA"
  } <<
    \new Voice { \sopranoNotes }
    \new NullVoice = "soprano" { \sopranoNotes }





I think age is a very high price to pay for maturity.
-- Tom Stoppard

reply via email to

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