lilypond-user
[Top][All Lists]
Advanced

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

Re: nopc -- Proposed Predefines


From: James E. Bailey
Subject: Re: nopc -- Proposed Predefines
Date: Mon, 14 Jul 2008 13:00:31 +0200


Am 14.07.2008 um 12:28 schrieb Carl D. Sorensen:




On 7/14/08 3:24 AM, "Nicolas Sceaux" <address@hidden> wrote:

Le 14 juil. 08 à 04:21, Carl Sorensen a écrit :

I propose some new predefined functions:

\pointAndClickOn

pointAndClickOn = #(ly:set-option 'point-and-click #t)

and

\pointAndClickOff

pointAndClickOff = #(ly:set-option 'point-and-click #f)


These do not do what you think they do.
When the first "pointAndClickOn = ..." is read by the parser, the
scheme expression that is following is evaluated, and thus
point-and-click is turned on. pointAndClickOn then holds the value
returned by ly:set-option (which is #t I guess).
So what you have done here, is to set pointAndclickOn to #t, and
pointAndClickOff to #f, and turned on then off the point and click
function.

The music function mentionned by James in the first place did what
you want:

noPointAndClick =
#(define-music-function (parser location) ()
 (ly:set-option 'point-and-click #f)
 (make-music 'SequentialMusic 'void #t))

here, the option is set when \noPointAndClick is invoked, not
when it is defined.


Thanks, Nicolas. I should have recognized that, because I've just been
doing some work with void music functions.

OK, so now we have the right functions; do we want to have this added as a
predefined command?  So far I count one yes and one no on user.

Carl

What's the disadvantage to having it as a predefined function?



reply via email to

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