lilypond-user
[Top][All Lists]
Advanced

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

Re: \context for named Staff


From: Mark Polesky
Subject: Re: \context for named Staff
Date: Fri, 7 Aug 2009 13:20:26 -0700 (PDT)

Jonathan Wilkes wrote:
> But I guess it's not possible to refer to a specific instance of
> a Staff in the layout block (at least I couldn't find any
> reference to doing this).

Not that I know of, but I've always silently wished for this.
I'll ask the developers.

> If this is true, then how do you do staff size changes- like
> making the flute staff smaller for the piano score- without
> doing everything manually for each score/part?

At the moment, this is the best I can come up with.

Does this help?
- Mark

*******************

\version "2.13.4-1"

#(define (inverse-magstep x)
  (* 6 (/ (log x) (log 2))))

smallStaff = {
  #(define factor 3/4)
  \set Staff.fontSize = #(inverse-magstep factor)
  \override Staff.StaffSymbol #'staff-space = #factor
}

\score {
  <<
  \new Staff = "staffFlute"  {
    \smallStaff
    c''
  }
  \new PianoStaff = "staffPiano"
    <<
      \new Staff { c'' }
      \new Staff { \clef bass c }
    >>
  >>
}


      




reply via email to

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