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 Wright
Subject: Re: Lilypond structure / implicit - explicit / with statement
Date: Mon, 4 Apr 2016 22:56:21 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue 05 Apr 2016 at 01:04:40 (+0200), Thomas Morley wrote:
> 2016-04-04 23:58 GMT+02:00 David Sumbler <address@hidden>:
> >
> > Just a thought - perhaps one day somebody who understands Lilypond well
> > might write a section for the docs, starting with the basic
> 
> Well, the full quote:
> 
> LilyPond treats input like this:
> 
> \relative {
>   c''4 a d c
> }
> 
> as shorthand for this:
> > \book {
> >   \score {
> >     \new Staff {
> >       \new Voice {
> >         \relative {
> >           c''4 a b c
> >         }
> >       }
> >     }
> >     \layout { }
> >   }
> > }
> > structure shown in LM3.1.1 (what happened to \bookpart I wonder)

... and StaffGroup.

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? And why not \new Score?

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?

> The example shows how LilyPond treats the input.
> 
> If you do:
> 
> bk =
> \book {
>   \score {
>     \new Staff {
>       \new Voice {
>         \relative {
>           c''4 a b c
>         }
>       }
>     }
>     \layout { }
>   }
> }

If LilyPond had an IDE, it might well start off with something looking
rather like that. Pressing, say, F1 at any point might give you
suggestions as to what could appear there.
Kind of syntax highlighting on steroids.

> #(write-me "book? " (ly:book? bk))
> #(write-me "book-parts present: " (ly:book-book-parts bk))
> 
> You'll se that _no_ bookparts are created. So the example _is_ complete.
> Why mention bookpart if not present, same for other stuff like
> ChoirStaff, ChordNames, DrumVoice, etc, etc
> 
> Btw, bookparts _are_ books. See:
> bkprt =
> \bookpart { \score { \new Staff { cisis'1 } } }
> 
> #(write-me "book? " (ly:book? bkprt))
> 
> They are differently treated, though...
> 
> 
> In general I think we would do our users a favor to emphasize the
> recommendation to use the various display-functions more prominently.
> 
> I do it all the time, sometimes writing special ones, like earlier in
> this thread.
> If I don't understand things, I first display them, always, sometimes
> every little detail...
> Works great form me.

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

Cheers,
David.



reply via email to

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