On Sun, Jan 6, 2013 at 12:28 AM, David Kastrup <[email protected]> wrote:
> Olivier Biot <[email protected]> writes:
>
> > Well, putting { ... } around it is wrong, for one thing: it turns
> > the
> > whole into sequential music.
> >
> > Bingo!
> >
> > This is the most counterintuitive syntactic element in LilyPond for
> > newcomers (after Scheme). In most programming languages, curly braces
> > are used for grouping commands, in LilyPond curly braces have a double
> > life and can be used in one of their shapes as a shorthand for "define
> > serial music" (as opposed to "define parallel music" which is done
> > with double angle brackets. The double meaning of the curly braces in
> > LilyPond is rather confusing and I still have the impression at times
> > that things seem to work out of sheer luck when using curly braces.
> >
> > Is this double meaning of curly braces documented somewhere? I did not
> > come across it in the online manuals so far.
>
> What double life? Within music, curly braces create sequential music.
> What other meaning do you see?
>
First meaning of curly braces as "block delimiter", e.g. in:
\score {
% Serial or parallel music goes here
\layout {
% Layout directives go here
}
}
Second meaning as "serial music definition", e.g. as a music expression
that will be used in a voice within a score block:
theMusic = { c8 d e4-. f2 }
It is very difficult to disambiguate the meaning of the curly braces
without looking at where they will eventually appear.
Best regards,
Olivier
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user