lilypond-user
[Top][All Lists]
Advanced

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

Re: Part name with staff groups/grand staff


From: Reinhold Kainhofer
Subject: Re: Part name with staff groups/grand staff
Date: Fri, 15 Jan 2010 14:02:12 +0100
User-agent: KMail/1.12.4 (Linux/2.6.31-17-generic; KDE/4.3.4; i686; ; )

Am Freitag, 15. Januar 2010 13:43:20 schrieb address@hidden:
> I didn't know that a pianostaff can contain more than 3 staffs and
> that instrument name of staffs in a pianostaff can be set.

I wouldn't use PianoStaff in your case, but rather GrandStaff (PianoStaff is 
basically the same as GrandStaff, but has some small tweaks to make it better 
suited for piano).

> \new StaffGroup <<
>  \set StaffGroup.instrumentName = #"Horn"
>  \new Staff { \set Staff.instrumentName = "1. 5." c'1 }
>  \new Staff { \set Staff.instrumentName = "2. 6." c'1 }
>  \new Staff { \set Staff.instrumentName = "3. 7." c'1 }
>  \new Staff { \set Staff.instrumentName = "4. 8." c'1 }
> 

By default, StaffGroup does not print it's instrument name (I wonder why, 
since if no instrument name is set explicitly, it doesn't matter anyway, and 
if an instrument name is set explicitly, then the user wants the instrument 
name...). So, you have to add the object (called an "engraver" in lilypond 
terminology) to print the instrument name to the StaffGroup:

\new StaffGroup \with { \consists "Instrument_name_engraver" } <<
  \set StaffGroup.instrumentName = #"Horn"
  \new Staff { \set Staff.instrumentName = "1. 5." c'1 }
.....

Or even better:

\new StaffGroup \with { 
      \consists "Instrument_name_engraver" 
      instrumentName = #"Horn"
} <<
  \new Staff \with { instrumentName = "1. 5." } { c'1 }
.....

(i.e. staffgroup-wide settings can be inserted in a \with clause to make it 
even easier to see the settings for a staff or a group


Cheers,
Reinhold


-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org




reply via email to

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