[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-bug
Subject: Re: Staff switch line (documentation?) bug
From: Han-Wen Nienhuys <hanwen () xs4all ! nl>
Date: 2005-02-26 20:58:41
Message-ID: 16928.58113.146664.986127 () byrd ! xs4all ! nl
[Download RAW message or body]
gperlist@shaw.ca 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 | hanwen@xs4all.nl | http://www.xs4all.nl/~hanwen
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic