[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Code review/discussion time again.
From: |
David Kastrup |
Subject: |
Re: Code review/discussion time again. |
Date: |
Sat, 21 Nov 2009 23:52:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Carl Sorensen <address@hidden> writes:
> On 11/19/09 5:20 PM, "David Kastrup" <address@hidden> wrote:
>
>>
>>
>> I have no idea what I am doing here. In particular not with the
>> \override, and the set-object-property!. Can somebody explain to me
>> just what data structures I happen to manipulate, and how a user is
>> actually _supposed_ to be mangling them?
>>
>
>> \override Staff.TextScript #'accordion #'symbol = #$accordion
>
> I have no idea what you're trying to do here.
Neither do I, as I said. Different Staffs can use different types of
accordion definitions. So I make a command for setting the type of
accordion symbol to use that works staff-local.
Now markup objects seemingly have their properties stuck in TextScript,
and I poke TextScript with a stick until it appears to do what I want.
Since I have no idea what I am doing, the question is whether this is a
good idea.
> TextScript is a layout object that has certain properties. You can
> find out about the standard settings and the interfaces in the
> internals reference, at 3.1.111.
Yes, but that is no fun since I need _new_ internals local to the staff.
> As far as I can see, there is no interface that has an 'accordion
> property, so this \override doesn't make much sense.
>
> However, because there is no error given when an undefined property is
> set, the \override will be added to the context anyway.
There would be a warning given. I squelch the warning with
#(set-object-property! 'accordion 'backend-type? list?)
I have no idea why I do this: this basically just mimics a side-effect
from Lilypond-internal code working off internal property tables that is
not callable from user namespace.
It is not good code to poke internals like that, but I don't see a user
accessible interface for doing the equivalent.
> If you are just creating a markup for accordion, the grob is a
> TextScript object, and nothing more.
>
> If you want to create accordion grobs (which will included a markup
> for display, plus other stuff happening in the music), then you will
> need to create an accordion engraver.
I am not sure yet about just what I will need to create for what
particular task. I am trying to solve subtasks, even if it means my
level of understanding forces me to take a crowbar. But a working
example is a good way of asking people how things should be done
properly. Or at least that was the idea.
--
David Kastrup
- Re: Code review/discussion time again., (continued)
Re: Code review/discussion time again., Graham Percival, 2009/11/21
- Re: Code review/discussion time again., David Kastrup, 2009/11/21
- Re: Code review/discussion time again., Graham Percival, 2009/11/21
- Re: Code review/discussion time again., David Kastrup, 2009/11/21
- Re: Code review/discussion time again., Carl Sorensen, 2009/11/21
- Re: Code review/discussion time again., Carl Sorensen, 2009/11/22
Re: Code review/discussion time again., Carl Sorensen, 2009/11/21
- Re: Code review/discussion time again.,
David Kastrup <=
- Re: Code review/discussion time again., Neil Puttock, 2009/11/21
- Re: Code review/discussion time again., David Kastrup, 2009/11/21
- Re: Code review/discussion time again., Neil Puttock, 2009/11/21
- Re: Code review/discussion time again., David Kastrup, 2009/11/21
- Re: Code review/discussion time again., Reinhold Kainhofer, 2009/11/21
- Re: Code review/discussion time again., Neil Puttock, 2009/11/21
- Re: Code review/discussion time again., David Kastrup, 2009/11/21
- Re: Code review/discussion time again., Carl Sorensen, 2009/11/21
- Re: Code review/discussion time again., David Kastrup, 2009/11/22
- Re: Code review/discussion time again., Carl Sorensen, 2009/11/22