lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 3720: Built-in templates for SATB vocal scores (issue 41990043


From: Devon Schudy
Subject: Re: Issue 3720: Built-in templates for SATB vocal scores (issue 41990043)
Date: Sun, 12 Jan 2014 03:05:10 -0500

David Kastrup wrote:
> At any rate, I'm not really happy with the macro usage at top level
> here: I think it would be better if the basic assembly was rather done
> by music or Scheme functions

I'm not really happy with it either, because users have no hope of
modifying it or learning from it. The macro-generated version is much
shorter, but that's not worth the inability to copy and modify. I
rewrote it using functions, but that's not much easier for users, and
is almost as long as the original version with no attempt to factor
out the repetition.

The reason for the macros is so the definedness of variables can be
checked at macroexpand time, to avoid compiling references to
undefined names — that works in Guile 1.8 but not in Guile 2, and it's
bad style anyway. But we can avoid the `defaulting` macro by simply
defining the variables iff they're not already. Guile 2's define-once
does exactly this, and it's easy to recreate it in Guile 1.8. (This
also fixes the problem with \Layout.)

Using define-once instead of `defaulting` and removing the
staff-making functions leaves it almost identical to Trevor's original
version, except that there's no separate init file, and there's one
conditional for whether to have two voices per staff.



reply via email to

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