[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Staff switch line (documentation?) bug
From: |
Han-Wen Nienhuys |
Subject: |
Re: Staff switch line (documentation?) bug |
Date: |
Sat, 26 Feb 2005 21:58:41 +0100 |
address@hidden writes:
>
> On 22-Feb-05, at 7:01 AM, Yuval Harel wrote:
> > Sorry, this still seems wrong to me.
> >
> > First, PianoStaff.followVoice=##t usually does not produce voice
> > followers where the staff is not switched. When it behaves well it is
> > still a useful feature, and should be documented. Also, I think the
> > behavior I've shown should still be considered a bug.
> >
> > Second, the new example given in the documentation
> > (http://lilypond.org/doc/v2.5/Documentation/user/out-www/lilypond/
> > Staff-switch-lines.html) is misleading, and IMO bad style. The
> > property is set before the context in which it belongs is
> > instantiated. If I understand correctly, this only works because the
> > staff and voice context are unnamed. Someone not yet familiar with
> > \set commands will expect this example to always work throughout the
> > piano staff. But it won't have effect outside the main voice, and will
> > produce an unexpected extra Staff if the first staff is named (it
> > probably is going to be named eventually, if the piece has any staff
> > switches in the opposite direction).
>
> Sorry, I'm lost here. Anybody else want to comment on this? On a
> question of
> style, or programming, or documentation?
Yuval is right,
\set followVoice= ##t
within Staff is equivalent to
\context Voice = ""
\set Voice.followVoice= ##t
if it is followed by
\new Voice { c4 .. }
then the setting doesn't affect the notes, since it happens in a
different voice (the first one being Voice="", the second one being
Voice="\new").
Similarly, if it is followed by \new Staff, you'd get an extra staff.
Proper style would be
\new PianoStaff
<<
\new Staff {
\set followVoice= ##t
..notes..
}
>>
or
\new PianoStaff
<<
\new Staff <<
\new Voice {
\set followVoice= ##t
..notes..
Han-Wen Nienhuys | address@hidden | http://www.xs4all.nl/~hanwen