lilypond-user
[Top][All Lists]
Advanced

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

Re: Instrumental Group Names in Score


From: Jeremiah Reilly
Subject: Re: Instrumental Group Names in Score
Date: Thu, 3 Jan 2008 11:55:27 -0500

Kieren,

Once again (and again), thank you for your advice.

On Sunday, December 30, 2007, at 12:47 PM, Kieren MacMillan wrote:


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).

I agree with your approach to learning Lilypond. This is how I have solved most of my problems engraving music with Lilypond. In the particular instance above, however, I am not sure how I would *know* to replace \GrandStaff with \InnerStaffGroup. See next paragrraph below.

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.)

I appreciate your concise summary of Lilypond structure. I am casting about for simple examples of something I don't understand. In the meantime, I have two general illustrations.

(1) Last year I had to learn LaTeX and a corollary TeX based technical drawing package called mfpic in order to typeset mathematical expressions and illustrations. In three weeks I was up and running in LaTeX and mfpic and could produce *professional* quality work. I have easily spent 10 times the amount of time studying Lilypond and understand only 1/10th of what I can do in LaTeX. As crude as my comparison is, the difference is a factor of 100 fold or more. This is why I say I am frustrated with Lilypond. I *understand* LaTeX; I am *baffled* by Lilypond.

(2) A recent thread raised the issue of engraving title pages in Lilypond books, an issue I have been grappling with. Nicolas Sceaux replied to this issue with a link to his book (Note to Nicolas: Beautiful engraving!). I followed his link and looked at his code (here is a small excerpt):

oddFooterMarkup = \markup \column {
\fill-line {
%% put copyright only on pagenr. 1
\on-the-fly #(lambda (layout props arg)
(if (and (= 1 (chain-assoc-get 'page:page-number props -1))
(not (chain-assoc-get 'page:last? props #f)))
(interpret-markup layout props arg)
empty-stencil))
\fromproperty #'header:longcopyright
}


I am *completely* lost. I have no idea of the what this code is for. (In fact, I can read the French at Nicolas's website better than I understand the Lilypond code.) I do not want to decipher Nicolas's code in this thread. Rather, I am using his code to illustrate the kinds of situations or the kinds of Lilypond code where I get lost.

I think part of my bafflement with Lilypond is the *looseness* of the structure. If you don't do something, Lilypond creates it for you (Book, Score, Staff). You can tweak the engraving at the Staff level, score level, layout level, paper level...). In LaTeX, if you don't code the input right, LaTeX doesn't work. Period.

cheers,

Jeremiah
reply via email to

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