lilypond-user
[Top][All Lists]
Advanced

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

Re: Understanding Lilypond


From: Urs Liska
Subject: Re: Understanding Lilypond
Date: Fri, 16 Jan 2015 14:28:52 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


Am 16.01.2015 um 13:35 schrieb David Sumbler:
As I start to gain experience in setting music in Lilypond I am trying
to understand more about how it works internally.  As well as personal
satisfaction, this obviously has a practical aim: it will make it easier
for me to modify or correct things without having to ask so many
questions on this forum, and will also perhaps eventually mean that I
can help by answering others' questions.

However, despite having read the documentation - some of it several
times - I do find understanding some aspects of the structure of
Lilypond extremely difficult.  One of the manuals likens a Lilypond file
to source code in a computer language, but I find that understanding the
structure of a coding language is perfectly straightforward compared to
getting my head around Lilypond.  (I have learnt several languages over
the years, although not, I admit, Lisp or Scheme; however, I have no
reason to suppose that understanding their structure is any more
difficult than other languages).

For instance, in Lilypond there is a sensible difference in the default
handling of time- and key-signatures.  Using the \key command a key is
defined for the current Staff.  But using the \time command sets the
time signature for every staff.  If a different time signature is
required for a particular staff, then timeSignatureFraction has to be
changed.

 From the Internals Reference I see that the 2 layout objects
KeySignature and TimeSignature both exist, by default, in a Staff
context, which makes perfect sense.

Yes, that makes sense because they are used to *engrave* the visual objects at staff level.


Clearly, though, when the \time command is used, then not only is
Staff.timeSignatureFraction set, but so also is some other variable in a
higher context.

The timing aspects are controlled by the Timing_translator, and this engraver by default lives in the Score context. Which also makes perfect sense because usually the timing is uniform in a score from top to bottom.

But this construct is what makes polymetrics so easy to do in LilyPond. You can move the Timing_translator from the Score to Staff level to get independent timing in the different staves. But you should not forget to also move the Default_bar_line_engraver that should live at the same level as Timing_translator.

With key signatures it is much more common that different instruments *show* different keys. Nevertheless it *is* sort of an inconsistency that you *always* have to specify the key for each staff separately (or in a global variable, which is not much better). It would be more consistent to have the key also live in the Score context by default and give the ability to sepcify contexts with different keys through their context properties.
I think this has been discussed recently.

HTH
Urs


What I can't seem to find (although it may well be in the documentation
somewhere) is a clear explanation of this.  Can somebody point me in the
right direction?

David


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

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