lilypond-user
[Top][All Lists]
Advanced

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

Re: Smarter cross-staff Beam 'positions?


From: Trevor Bača
Subject: Re: Smarter cross-staff Beam 'positions?
Date: Thu, 17 Jan 2008 18:41:47 -0600

On Jan 17, 2008 10:35 AM, Mats Bengtsson <address@hidden> wrote:


Trevor Bača wrote:
> Is there a way to get "normal" (noncrosss-staff) beams to likewise sit
> at that same vertical position?
>
> (IOW, I'm looking for both flat and vertically aligned; Rune's #+inf.0
> gets flat ... now for the vertically aligned part?)
That sounds like en excellent example of when you want to use positions,
right?

Oh yes, definitely! Beam 'positions is my friend. The challenge in this case is that the vertical values passed to 'positions is *relative to different staves* if you staff-\change notes.

So when we build an example like this one ...


%%% BEGIN %%%

\version "2.11.34"

\new PianoStaff <<
   \new Staff = RH {
      \time 9/8
      \override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-10 . 20)
      \override Stem #'direction = #down
      \override Beam #'positions = #'(-7 . -7)

      c'8 [
      c'8
      \once \override Stem #'direction = #up
      \change Staff = LH
      c'8 ]
      \change Staff = RH

      c'8 [
      \once \override Stem #'direction = #up
      \change Staff = LH
      c'8
      \change Staff = RH
      c'8 ]

      \once \override Beam #'positions = #'(7.5 . 7.5)
      \change Staff = LH
      \once \override Stem #'direction = #up
      c'8 [
      \change Staff = RH
      c'8
      c'8 ]
   }

   \new Staff = LH {
      \clef bass
      s1 * 9/8
   }
>>

%%% END %%%



... we start out with one pair of values here ...

      \override Beam #'positions = #'(-7 . -7)  % notice negative values below RH staff

... but we are forced to tweak by hand and set another pair of values here ...

      \once \override Beam #'positions = #'( 7.5 . 7.5)  % notice positive values above LH staff

... all just to say "vertically align my beams ... no matter what the 'staff' of the first note."


So what would be ideal would be either ...

1. a way either to prevent staff-\changes from causing us to have to make multiple settings to Beam 'positions, or

2.  a way to reach into the object model and set Beam 'positions in terms of a "remote" staff.


Is there some deep Scheme magic that might allow for the latter?






--
Trevor Bača
address@hidden
reply via email to

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