lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond structure / implicit - explicit / with statement


From: David Kastrup
Subject: Re: Lilypond structure / implicit - explicit / with statement
Date: Tue, 05 Apr 2016 10:05:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

David Wright <address@hidden> writes:

> It's interesting to compare this structure with NM5.1.1 where \score
> is the topmost context and StaffGroups are "top-level" contexts.
>
> And why book, score and not Book, Score?

You mean \book and \score.  Because those are elements of LilyPond's
syntax, not context names.

> And why not \new Score?

There is nothing wrong with \new Score but it's not more than an
(intermediate) context.  If you want to use it with \with, you'll
actually write it.  If you want to spell out implied contexts, you are
free to write something like

\score {
  \context Global
     \new Score
        \new Staff
           \new Voice {
              c' d' e' f'
           }
}

> And, if you actually *do* write \new Score, why does the parser object
> to its \layout command; but if you now delete the \layout command,
> why does the parser not object to \new Score any more?

Because you are free to write any music at top level, including \new
Whatever.  But that does not magically change the syntax or allow
\layout to be inserted into music.  Just because some context is named
Score does not make it special syntactically.  The Global context _is_
special semantically in that it gets created whenever music is
interpreted (whether explicitly wrapped in \score or not).  But pretty
much anything else is a consequence of the context hierarchies defined
in ly/engraver-init.ly.

> Does LP have any display functions? (I mean like \the in TeX.)
> For example, if mus = { a b c d }, I can render it and read the
> music from the score, but how would I type   <ShowMe> \mus
> and get
> => { a b c d }
> displayed in the LP output stream? Or how about
> <ShowMe> LyricText.font-size
> => -3
> <ShowMe> LyricText
> font-size => -3 font-shape => 'italic ... etc.
>
> I'm almost reluctant to ask a question like this,
> having recently reread the thread starting at
> http://lists.gnu.org/archive/html/lilypond-user/2016-02/msg00700.html

Take a look at \displayMusic, \displayLilyMusic, \displayScheme.

-- 
David Kastrup



reply via email to

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