lilypond-user
[Top][All Lists]
Advanced

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

Re: HELP: Trill line without 'tr' written before it


From: David Kastrup
Subject: Re: HELP: Trill line without 'tr' written before it
Date: Wed, 16 Mar 2016 17:46:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

tisimst <address@hidden> writes:

> On Wed, Mar 16, 2016 at 10:11 AM, Kieren MacMillan [via Lilypond] <
> address@hidden> wrote:
>
>> Hi David,
>>
>> > violin.2 = { c d }
>> > will work, as will \violin.2 (as of issue 4797) or \violin.#(+ 1 1)
>>
>> Wow! That’s wonderful news.
>> Thanks, as always, for your excellent work on improving Lilypond.
>
>
> +1 (x10)!
>
> I don't think I'll ever use the #(+ 1 1) form to auto-generate part
> variables, but that's cool, nonetheless. Absolutely fantastic, David! Does
> this work too (just trying to understand the limitations of this syntax):
>
> violin.#(+ 1 1) = { c d }
>
> or just when the variable is called, like you mentioned?

This will work as well.  As will

violin.I = { c d }
violin.II = { e f }

which is sort of equivalent to

violin = #`((II . ,#{ e f #}) (I . ,#{ c d #}))

Whether your dotted lists are symbolic or numeric, they will create
alists which are consequently less efficient to access than separate
variables as you would do when writing violin_I and violin_II .  I'm
still fuzzy about schemes allowing to optionally use arrays or hash
tables rather than alists.

This is definitely one area where "language design" is easier to do when
using Lua rather than Scheme, with its "there is only one data
structure, the table" principle.


-- 
David Kastrup



reply via email to

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