lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme variable name in lilypond


From: David Kastrup
Subject: Re: scheme variable name in lilypond
Date: Tue, 26 Jun 2018 00:05:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Gianmaria Lari <address@hidden> writes:

> On Mon, 25 Jun 2018 at 23:37, Thomas Morley <address@hidden>
> wrote:
>
>> 2018-06-25 23:31 GMT+02:00 Gianmaria Lari <address@hidden>:
>> > Is there any way to refer a scheme variable containing numbers in the
>> name,
>> > in lilypond?
>> >
>> > For example, if I write:
>> >
>> > #(define duration32 (ly:make-duration (ly:intlog2 32)))
>> >
>> > duration32 is a valid scheme variable name. But this is not a valid
>> lilypond
>> > variable name. Is there any way to access it anyway in lilypond?
>> >
>> > Thank you, g.
>>
>> #(define duration32 (ly:make-duration (ly:intlog2 32)))
>>
>> \void \displayMusic \"duration32"
>>
>
> uhmm... ok!

It appears more logical if you write

"duration32" = #(ly:make-duration (ly:intlog2 32))

\void \displayMusic \"duration32"

Not a particularly great kind of syntax but it seemed better than not
being able to express this from LilyPond.

You can, of course, also write $duration32 instead.  It's pretty
equivalent to \"duration32" except that the latter is delimited (and so
does not need a space following it) while the former uses Scheme syntax.

-- 
David Kastrup



reply via email to

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