lilypond-user
[Top][All Lists]
Advanced

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

Re: Learning LilyPond, comments invited


From: David Kastrup
Subject: Re: Learning LilyPond, comments invited
Date: Fri, 03 Jan 2014 02:17:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Colin Tennyson <address@hidden> writes:

> David Kastrup wrote
>> \transpose c' c' can just be removed and/or inserted.
>> If a single music expression is preceded with \transpose c' c', the
>> result is again a single music expression.  And since \score only
>> accepts a single music expression, you can always insert \transpose c'
>> g' right before that expression without having to add or remove a single
>> brace.
>
> Thank you, your information will be very helpful to me.
>
> I will study all remarks, let me reply for now to this particular one.
>
> My prior experience with any form of markup code is HTML/CSS and SVG. In
> those environments when you open something you have to close it again.
>
> http://www.lilypond.org/doc/v2.17/Documentation/notation/changing-multiple-pitches#transpose
>
> That is the pattern that I see in the documentation.
> \transpose a c { ... }
> I assumed that the opening and closing brace are _part of the syntax_ of the
> \transpose command.
> I assumed that you _must_ tell the \transpose command where to stop
> transposing, hence I assumed a need for an opening and a closing brace. 
>
> I gather from your reply that the \transpose command is simply placed in
> front of a block, and then the \transpose command will apply to the end of
> that block.

LilyPond has no "blocks".  There are some constructs enclosing more than
one music expression, like { ... } (sequential music), << ... >>
(simultaneous music), < ... > (chords).

But the essential music expression does not need delimiters, and the
above constructs do not merely group more than one music expression but
they also imply semantics.

Now it's not all too different from C which tends to group a lot of
things with { } (and LilyPond also uses braces for more than just
music), but when { } are used in code, they are not just an amorphous
collection of statements, but imply _sequential_ execution of the
statements.

At any rate,

\transpose c' g' \transpose g' d' c'4-.

is a perfectly valid single music expression.

-- 
David Kastrup



reply via email to

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