[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Determining location of the staff lines
From: |
David Kastrup |
Subject: |
Re: Determining location of the staff lines |
Date: |
Thu, 18 Feb 2010 11:54:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) |
Carl Sorensen <address@hidden> writes:
> On 2/14/10 9:38 AM, "Eric Knapp" <address@hidden> wrote:
>
>> On Wed, Feb 10, 2010 at 8:58 PM, Carl Sorensen <address@hidden> wrote:
>>
>>> You're making great sense. =A0This is *really* easy, once you understand =
>> how
>>> LilyPond engravers work.
>>>
>>
>> I think I'm still missing a few pieces.
>>
>>> As an example, look at lily/fretboard-engraver.cc.
>>
>> My C++ is really rusty and while I see what going on, I can't see how
>> to do this in a Scheme engraver.
>
> I think it's not yet possible to do this in a Scheme engraver.
>
> Han-Wen indicated that it could be done here:
>
> http://lists.gnu.org/archive/html/lilypond-devel/2010-01/msg00594.html
>
> But I don't think it's been implemented yet. Perhaps Han-Wen will do so,
> now that we've identified a need.
Here is one possibility to do this in a somewhat sane manner: permit the
initialize function to return an alist that can replace elements in the
Scheme engraver alist.
Then you can use let and closures inside of the initialize function in
order to declare variables local to the functions of one engraver
instance.
To wit, use something like
#`((initialize .
,(lambda (trans)
(let ((all #f) (my #f) (local #f) (variables #f))
`(start-translation-timestep .
,(lambda (trans)
do something with local variables))))))
That does not place restrictions on the number and style of the local
variables, and it likely needs little enough additional code.
--
David Kastrup
- Re: Determining location of the staff lines, (continued)
- Re: Determining location of the staff lines, Carl Sorensen, 2010/02/03
- Re: Determining location of the staff lines, Eric Knapp, 2010/02/10
- Re: Determining location of the staff lines, Carl Sorensen, 2010/02/10
- Re: Determining location of the staff lines, Eric Knapp, 2010/02/14
- Re: Determining location of the staff lines, Carl Sorensen, 2010/02/15
- Re: Determining location of the staff lines, Eric Knapp, 2010/02/17
- Re: Determining location of the staff lines, Carl Sorensen, 2010/02/17
- Re: Determining location of the staff lines, David Kastrup, 2010/02/17
- Re: Determining location of the staff lines, Carl Sorensen, 2010/02/17
- Re: Determining location of the staff lines, Neil Puttock, 2010/02/17
- Re: Determining location of the staff lines,
David Kastrup <=
- Re: Determining location of the staff lines, Han-Wen Nienhuys, 2010/02/18
- Re: Determining location of the staff lines, David Kastrup, 2010/02/18