Naming a StaffGroup

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Naming a StaffGroup

Johannes Roeßler
Hi Lilypondians,

I've got an issue with the instrumnt names for ChoirStaffs. For a better understanding see the picture here: http://joeigraphie.de/lily/Bild8.png

Here the (hopfully small enough) example source code:
~~~~~~~~~~~~~8<~~~~~~~~~~~~~~~~~~~~~~~~~~

\version "2.19.58"


einzel = \new Staff
\with {
  instrumentName = "LongSingle"
  shortInstrumentName = "A"
}
\repeat unfold 50 r1

gruppe = \new StaffGroup
\with {
  instrumentName = \markup \rotate #90 "Chor II_l" 
  shortInstrumentName = \markup \rotate #90 "Chor II_s"
}

<<
  \new Staff
  \with {
    instrumentName = "long"
    shortInstrumentName = " "
  }
  \relative { \repeat unfold 50 r1 }
  \new Staff   \with {
    instrumentName = "long"
    shortInstrumentName = " "
  }
  \relative {\repeat unfold 50 r1 }
>>

\score {

  <<
    \einzel
    \gruppe
  >>

  \layout {
    indent = 2.5\cm
    short-indent = 2\cm


    \context {
      \Staff
       \override InstrumentName #'self-alignment-X = #0.5
   
    }

    \context {
      \StaffGroup
     \override InstrumentName #'self-alignment-X = #-0.5
     }
  }
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>8~~~~~~~~~~~~~~~~~~~~~~

In the first system I move the "long" InstrumentName of the group with \override InstrumentName #'self-alignment-X = #-0.5 to the left, so it doesn't collide with the staff names which I want to have in the first system. Later I only want to have the group name there, but in alignment with the staff names of the "non-group"-staffs. Unfortunately InstrumentName and ShortInstrumentName cannot be modified independently. Otherwise I would have left the contents of InstrumentName and ShortInstrumentName the same and moved one of them for the StaffGroup context, the other not.

Cheers Joei



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Naming a StaffGroup

Torsten Hämmerle
Hi Joei,

You can move the ChoirStaff's shortInstrumentName almost wherever you want
by using an appropriate markup.
There's a mean little trick combining an empty markup " " with the actual
instrument markup so that a \translate will take effect:

%%%%%%
gruppe = \new StaffGroup
\with {
  instrumentName = \markup \rotate #90 "Chor II_l"
  shortInstrumentName = \markup \combine " " \translate #'(2.5 . 0) \rotate
#90 "Chor II_s"
}
%%%%%%

… and that's what it looks like after the shortInstrumentName markup
manipulation:

<http://lilypond.1069038.n5.nabble.com/file/t3887/joei-choir.png>

HTH,
Torsten



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user