lilypond-user
[Top][All Lists]
Advanced

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

Re: Adjustments to lyrics alignment


From: David Kastrup
Subject: Re: Adjustments to lyrics alignment
Date: Wed, 29 Jan 2014 17:15:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Gonçalo Nogueira <address@hidden> writes:

> Learning Scheme is complete overkill for my Lilypond needs but
> I will probably learn it anyway just because it seems fun.
>
> I think Lilypond would greatly benefit from a way of defining
> simple macros that would enable one to just write something
> like:
>
> alignLyrics = \macro { \tweak self-alignment-X $1 \markup }
>
> and \aligntLyrics #0.4 would just expand to \tweak self-alignment-X #0.4
> \markup

For better or worse, LilyPond's extension features are tied deeper into
the language.

What you are thinking of is along the lines of what one can do using m4
or the C macro preprocessor.  C++ people generally try avoiding the
macro preprocessor since textual replacements often are cutting across
the syntax in unexpected ways.

Scheme, as a member of the LISP family, can actually do quite a bit with
macros while maintaining structure/nesting.  Of course, the cost for
that is that it knows exactly one kind of structure/nesting/punctuation
(give or take a few exceptions).  Which makes it only moderately popular
with humans who prefer a higher information density.

On the other hand, English has become a rather popular language even
though Ancient Greek allowed fitting a concept like "you two should have
started being a little ashamed of yourself" into a single word (using
mood "Optative", number "Dual", time "Aorist", mode "Medium" instead of
getting constrained with conjugation tables crippled to fit on a single
page or less).

Some things one can get used to.

At any rate, the LilyPond music input language is more leaning towards
conciseness rather than regularity, so writing "replacements" comes at
the cost of requiring a more thorough specification of the replacement
parts, while providing the benefit of actually figuring out rather well
what units you want to apply your functions to.

So Scheme is actually quite different in character from the LilyPond
input language.

-- 
David Kastrup



reply via email to

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