bug-lilypond
[Top][All Lists]
Advanced

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

Issue 270 in project lilypond


From: codesite-noreply
Subject: Issue 270 in project lilypond
Date: Fri, 02 Feb 2007 16:06:36 -0800

Issue 270: bus error old scheme example piano spacing
http://code.google.com/p/lilypond/issues/detail?id=270

New issue report by gpermus:
 
\version "2.11.11"

\header { texidoc = "
<p>It is possible to have different staff distances between
the staffs of a piano system, but it requires some advanced Scheme code. 
Currently, this is for testing purposes.  
" }

#(define ((futz-alignment-callback distance count) grob axis)

   "Check if we're the system number COUNT, and if yes, set fixed distance 
to
DISTANCE; then call the original callback.  "
   (let*
       ((a (ly:grob-parent grob axis))
        (o (ly:grob-original a))
        (bs (if (ly:grob? o)
                (ly:spanner-broken-into o)
                #f))
        )


     (if (and (list? bs)
              (< count (length bs))
              (equal? (list-ref bs count) a)
         )
         (ly:grob-set-property! a 'forced-distance distance))
     
     (Align_interface::fixed_distance_alignment_callback grob axis)) )

\score {
     \relative c''  \context PianoStaff
    \with {
        verticalAlignmentChildCallback = #(futz-alignment-callback 20 1)

        %% Every cross staff beam will trigger
        %% alignment unless autokneeing is switched off 
        \override Beam #'auto-knee-gap = #'()
    } <<

        \context Staff = "up" {
            
            \time 2/4 
            c8[
                \change Staff = down
                \once \override Stem #'direction = #UP
                c8
                \change Staff = up
                c c ](
            |
            \break
            
            c8[)
                \change Staff = down
                \once \override Stem #'direction = #UP
                c8
                \change Staff = up
                c c ](
        }
        \context Staff = "down" {
            \skip 1 }

    >>
}


Issue attributes:
        Status: Accepted
        Owner: gpermus
        Labels: Type-Defect Priority-High

-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings




reply via email to

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