Nik Repka <nikre...@gmail.com> writes:

>> I'm not top posting.
>
> I am attempting to make a scales sheet for piano.  I need to use autochange
> simultaneously in two voices.  
>
> I am using the syntax from this snippet page:
> http://www.lilypond.org/doc/v2.15/Documentation/snippets-big-page#keyboards-using-autochange-with-more-than-one-voice.
>
> The issue I am having is that autochange only works on the top voice,
> and it drags the lower voice up into the top staff.  Here is the code:

You only ever get one voice.  The result of \autochange is a complete

<< \context Staff = "up" { }
   \context Staff = "down" {}
>>

hierarchy with the code and context changes somewhere inside.  Putting a
\new Voice around all that will not achieve anything useful.  You wrote:

>       << \new Staff = "up"
>          <<
>            \new Voice {
>            \voiceOne
>            \autochange

...

Here is how to keep the basic framework but have it resulting in
separate voices:

\version "2.18.2"

scaleRH = \relative c' {c d e f g a b c c b a g f e d c
g a b c d e fis g g fis e d c b a g}

scaleLH = \relative c {c d e f g a b c c b a g f e d c 
g a b c d e fis g g fis e d c b a g}


\score {
   \new PianoStaff 
    
      << \context Staff = "up"
         <<
           \autochange
           \new Voice {
           \voiceOne
    
           \scaleRH 
           
           }
	   \autochange
           \new Voice {
           \voiceTwo

           \scaleLH 
           }
         >>

      \context Staff = "down" { 
          \clef bass
      }
      >>
}
Note that I'm not using \new Staff ... here in order not to create a
staff competing with the one delivered by \autochange, but rather
\context Staff in order to mesh with what might already be created.

-- 
David Kastrup
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to