lilypond-devel
[Top][All Lists]
Advanced

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

Re: Error in resolving number of staff lines


From: Phil Holmes
Subject: Re: Error in resolving number of staff lines
Date: Fri, 22 Jun 2012 09:34:03 +0100

----- Original Message ----- From: "Marc Hohl" <address@hidden>
To: "Lily-Devel List" <address@hidden>
Sent: Friday, June 22, 2012 9:13 AM
Subject: Error in resolving number of staff lines


Hello list,

the following snippet prints a value of 5 in both cases,
whereas the second system has
only four staff lines. What's wrong here?

Regards,

Marc

\version "2.15.41"

#(define (test-bar-print grob)
   (let* ((staff-symbol (ly:grob-object grob 'staff-symbol))
          (line-count (if (ly:grob? staff-symbol)
                          (ly:grob-property staff-symbol 'line-count)
                          0)))
          (display "\nNumber of staff lines: ")
          (display line-count)
          (ly:bar-line::print grob)))

\layout {
  \context {
    \Staff
    \override BarLine #'stencil = #test-bar-print
  }
}

\new Staff {
  s1 \bar ":|"
}

\new Staff {
  \override Staff.StaffSymbol #'line-positions = #'(-2 0 2 4)
  s1 \bar ":|"
}

You don't appear to have explicitly changed the number of lines.  Use

 \override Staff.StaffSymbol #'line-count = #4

and the result is correct.

--
Phil Holmes



reply via email to

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