[Top][All Lists]

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

Re: Staff switch line (documentation?) bug

From: Graham Percival
Subject: Re: Staff switch line (documentation?) bug
Date: Sat, 26 Feb 2005 03:24:20 -0800

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?

Also, I don't understand why the example code shows a {c} but the output shows a {c'}.

I can answer this issue. :) The example is created with the option [relative=1]. Even though we don't have a \relative c' {} in the text that's displayed, LilyPond treats it
as if it has \relative c' {} in there.

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]