On Fri 24 Nov 2017 at 10:08:29 (+0100), David Kastrup wrote:
> Gianmaria Lari <gianmarial...@gmail.com> writes:
> 
> > On 24 November 2017 at 09:49, David Kastrup <d...@gnu.org> wrote:
> >
> >> Gianmaria Lari <gianmarial...@gmail.com> writes:
> >>
> >> > I'm sorry for the trivial question but why this code is wrong?
> >> >
> >> > \version "2.19.80"
> >> >
> >> > music = {a b}
> >> > \music
> >> >
> >> >
> >> > My understanding was that "\music" is substituted by its value "{a
> >> b}"....
> >>
> >> You need to put anything in between.  LilyPond looks at \music before
> >> deciding the assignment is complete because the assignment could be
> >>
> >> music = {a b} \addlyrics {Oh well}
> >>
> >> For that it needs to decide what \music is but the assignment is not yet
> >> complete...
> >
> > Thank you David!
> >
> > It is a bit frustrating.
> 
> If you think that is frustrating, try working on the parser.  I didn't
> design that insane \addlyrics syntax.
> 
> > Even apparently simple things are complicated....  but that's ok.
> 
> Things are complicated _because_ of appearing simple.  Some simple
> appearances are more complicated to do than others.
> 
> You would not want to write your music in Scheme syntax, and that would
> be by far the simplest to make sense of.
> 
> I've worked on that late assignment nuisance a few times already.

When you think that writing just

\music

can buy you

\score {
  \new Staff {
    \new Voice {
      \music
    }
  }
}

and more, then having to write at least

{
  \music
}

won't seem so onerous.

Cheers,
David.

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

Reply via email to