[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: Instrumental Group Names in Score
From:       Kieren MacMillan <kieren_macmillan () sympatico ! ca>
Date:       2007-12-30 17:47:50
Message-ID: BAYC1-PASMTP128D04E441C3A55462BD4B94570 () CEZ ! ICE
[Download RAW message or body]

Hi Jeremiah,

> Thank you TWICE over for your help.

You're twice-over welcome!  =)

> Your code worked perfectly.

I try my best...

> Very frustrating!
> (This is a rhetorical question; no response necessary.)

Decided to respond anyway!

> How can I figure out "new" code to solve "new" problems when I  
> don't know the code exists?

I have learned essentially everything I know by looking at the  
examples which pepper the WWW. You might not find the *exact* code  
you need (e.g., to add an instrument name to the InnerStaffGroup  
context) but you're likely to find something similar -- for example,  
in the documentation for "Instrument Names" (<http://lilypond.org/doc/ 
v2.10/Documentation/user/lilypond/Instrument-names>), about half-way  
down you'll find the following:
_____________________________________

To add instrument names to other contexts (such as GrandStaff,  
ChoirStaff, or StaffGroup), the engraver must be added to that context.

\layout{
   \context {\GrandStaff \consists "Instrument_name_engraver"}
}

More information about adding and removing engravers can be found in  
Modifying context plug-ins.
_____________________________________

The only difference between my code (i.e., the solution to your  
problem) and the example code in the documentation is that I've  
replaced \GrandStaff with \InnerStaffGroup (because that's where you  
wanted the instrument name engraver added).

> There is something about Lilypond structure (or Scheme structure)  
> which continues to elude me.

>

It's actually pretty simple to grasp, once the fundamentals are clear:

1. Every \book block is a separate output file (e.g., PDF) -- if you  
haven't explicitly added one, Lilypond wraps your entire code block  
in a \book (implicitly).
2. Every \score block is a separate chunk of music in a \book.
3. Every \layout block affects the \score or \book block in which it  
appears -- i.e., a \layout inside a \score will affect only that  
\score, but a \layout outside of a \score (and thus in a \book,  
either explicitly or implicitly) will affect every \score in that \book.
4. Every \context block will affect the named context (e.g.,  
\InnerStaffGroup) throughout the block (e.g., \score or \book) in  
which it appears.

Any questions? (For more info, see the docs.)

Best wishes,
Kieren.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic