[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lily in scheme : using music expressions
From: |
Nicolas Sceaux |
Subject: |
lily in scheme : using music expressions |
Date: |
Fri, 30 Apr 2004 20:21:48 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
hi
A question about the use of variables in an embedded lily forms.
As it is done now,
#{ \override TextScript #'padding = #$pad #}
is read as:
#(ly:parse-string-result
(format #f " \override TextScript #'padding = #~a " pad)
(current-module))
that is, `pad' is written in the string to be parsed. This is ok for
numbers, strings, ie values which printed representation can be
re-read.
One might wonder if one could also use a music expression here. For
instance:
(define (add-some-props music)
#{ \override bla bla
\override bli bli
$music
\revert bla
\revert bli #})
Of course there are other ways to do that, but from a user point of
view, this may be handy.
However, this requires a music printing function, which is not
exactly trivial.
Do you think that would be valuable, or useless, or impossible, ... ?
nicolas
- lily in scheme : using music expressions,
Nicolas Sceaux <=