lilypond-user
[Top][All Lists]
Advanced

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

Re: \context for named Staff


From: Jay Anderson
Subject: Re: \context for named Staff
Date: Sat, 8 Aug 2009 09:13:43 -0700

On Sat, Aug 8, 2009 at 8:01 AM, Mark Polesky<address@hidden> wrote:
>
> Valentin Villenave wrote:
>
>> How about creating a FluteStaff context, and invoke it with
>> \new FluteStaff
>> instead of \with?
>
> I think "SmallStaff" is more accurate.
> - Mark

It would be nice if something like this were included in the default
lilypond install. It's fairly common for piano+1 pieces. Below is a go
at it. It should also let you create a small piano staff with normal
sized part also.

-----Jay


\version "2.12.2"

\paper { ragged-right = ##t }

fluteNotes = \relative c'' { c4 d e f | }
rightHandNotes = \relative c' { e4 f g a | }
leftHandNotes = \relative c { c4 c c c | }

\score
{
  <<
    \new SmallStaff
    {
      \fluteNotes
    }
    \new PianoStaff
    <<
      \new Staff
      {
        \rightHandNotes
      }
      \new Staff
      {
        \clef bass
        \leftHandNotes
      }
    >>
  >>
  \layout
  {
    \context
    {
      \Score
      \accepts "SmallStaff"
    }
    \context
    {
      \PianoStaff
      \accepts "SmallStaff"
    }
    \context
    {
      \Staff
      \type "Engraver_group"
      \name "SmallStaff"
      \alias "Staff"

      fontSize = #-3
      \override StaffSymbol #'staff-space = #(magstep -3)
    }
  }
}




reply via email to

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