lilypond-user
[Top][All Lists]
Advanced

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

Re: Argument transfer?


From: Nicolas Sceaux
Subject: Re: Argument transfer?
Date: Tue, 07 Jun 2005 22:49:59 +0200
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Erik Sandberg <address@hidden> writes:

> On Monday 06 June 2005 20.02, Fairchild wrote:
>> Eric, et. al. -
>>
>> Thanks for the response, even though it hasn't led anywhere.
>>
>> Let's try the question a couple of other ways.
>>
>> Can Scheme code be used within a \score block?
>>
>> Can a variable, defined in the ly file, be reassigned a new value within
>> the \score block?
>
> Unfortunately, you can see variables quite much as macros, i.e. a variable is 
> substituted at once when the variable name is found in an expression.
>
> BTW, if you are in need for parameters, you may want to consider using some 
> preprocessor, e.g. m4 or gpp, for your ly files.

I would like to see a real example where a pre processor is a win over
using LilyPond's built-in extensibility capabilities, which many seem
to underestimate.

The relevant sections of the manual can be found here:

  
http://lilypond.org/doc/v2.5/Documentation/user/out-www/lilypond/Programmer-interfaces-for-input.html

The short answer to Fairchild's question is:

BigOn = #(def-music-function (parser location size) (number?)
          #{ \override NoteHead #'font-size = #$size #})

\relative c'' {
  c c c c
  \BigOn #3
  c c c c
  \BigOn #6
  c c c c
}

nicolas




reply via email to

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