[Top][All Lists]

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

Re: Staff switch line (documentation?) bug

From: Yuval Harel
Subject: Re: Staff switch line (documentation?) bug
Date: Tue, 22 Feb 2005 17:01:02 +0200
User-agent: Opera M2/7.54 (Win32, build 3865)

On Tue, 15 Feb 2005 02:43:26 -0800, Graham Percival <address@hidden> wrote:

On 15-Feb-05, at 1:25 AM, Erik Sandberg wrote:
PianoStaff.followVoice=##t changes the property for the entire piano staff, this is why the other voices are affected as well. Instead you should set Voice.followVoice=##t, or just followVoice=##t. This produces the correct

OK, got it.  Fixed in CVS.

- Graham

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). Also, I don't understand why the example code shows a {c} but the output shows a {c'}.

I suggest that \showStaffSwitch be changed to mean {\set PianoStaff.followVoice=##t}, and the documentation to say:

Whenever a voice switches to another staff, a line connecting the notes can be printed automatically. This is switched on using \showStaffSwitch, and turned off using \hideStaffSwitch.

     \context PianoStaff <<
       \context Staff=one \context Voice {
         \change Staff=two
         b2 a
         \change Staff=one
         \change Staff=two
         b2 a
      \context Staff=two { \clef bass s1*4 }

\showStaffSwitch will show staff-switch lines for all voice in the current PianoStaff. It is equivalent to {\set PianoStaff.followVoice = ##t}. To produce lines for the current voice only, use {\set followVoice = ##t}.


reply via email to

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