[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Instanciable scheme engraver (issue216066)
From: |
Nicolas Sceaux |
Subject: |
Re: Instanciable scheme engraver (issue216066) |
Date: |
Sun, 28 Feb 2010 18:23:45 +0100 |
Le 28 févr. 2010 à 17:11, Han-Wen Nienhuys a écrit :
> On Sun, Feb 28, 2010 at 12:48 PM, Nicolas Sceaux
> <address@hidden> wrote:
>
>>> On Sun, Feb 21, 2010 at 7:10 AM, <address@hidden> wrote:
>>>> This is a proof-of-concept for instanciable scheme engravers, with
>>>> private instance slots.
>>>
>>> Looks OK to me; maybe you'd want to pass in the context into the
>>> function, so it can do additional switching based on properties?
>>
>> Isn't the context accessible through the translator argument of
>> e.g. the initialize function?
>>
>> (initialize . ,(lambda (translator)
>> (let ((context (ly:translator-context translator)))
>> ...
>
> Right, but at that point the alist (and the other functions as well)
> are already constructed? Maybe you would want to switch earlier.
Right, anyway, "ça ne mange pas de pain" (as we say in French,
literally: it does not eat bread).
I've uploaded another patchset, which shows in particular how the
ambitus engraver may be implemented in scheme, after adding a few
scheme callbacks.
<http://codereview.appspot.com/216066>
(allthough scheme-engraver-ambitus.ly would not be a regression test,
but rather an example, but I don't where such things go these days).
Nicolas