[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: Mon, 23 Nov 2009 15:47:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:

> On Mon, Nov 23, 2009 at 4:02 AM, 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?
>>> Perhaps you could explain us how accordion notation works; that will
>>> make it easier to give advice on how to best achieve your targets.
>> In the context of _this_ patch, we are just placing register symbols.
> Right, but I have the feeling this patch is the wrong way to go, but I
> need more information.

Well, currently it is not as much a patch than a snippet of user-level
code, neither fit nor intended for inclusion in the Lilypond source
tree.  There are quite a few user-level code snippets in the LSR that
certainly feel "the wrong way to go" not just for me.

At the current point of time, this code is the result of beating
Lilypond with a crowbar until the behavior has mostly the scoping I

I was rather hoping for "are you crazy, you have to do this sort of
thing in _this_ way" answers.  Because just asking the questions without
this addition of badly written code did not suffice for moving me
forward.  I am several months into this "project" with just ugly hacks
to show.  So I show them.

>>> -  the type of accordion (eg defaultStdBassV), which typically span
>>> multiple notes, or even the entire piece?
>> There are separate symbol sets for left and right hand, and that of the
>> left hand may be interchanged in mid-stream.
>>> - the register of a note.  Is that specific for one note or for
>>> multiple notes?
>> Multiple notes.
> If both are stateful properties (ie. span multiple notes) of the
> music, like key signatures, they should be context properties, to be
> modified using
>   \set accordionType = "StdVII"
>   \set accordionRegister = "22x7whatever"


> When are there symbols to be printed?  In case of a change of either
> property, manual forcing, or both?

Change.  There is also a case for pure markup changes.  It is common to
give more than one registration, something like

\registersymbol "101" \bracket { \registersymbol "11" }

to indicate an alternative register if your actual instrument does not
have the required register.

> In any event, the correct approach would be write an engraver, which
> unfortunately cannot currently be done in Scheme (it would be a nice
> project to write bindings to enable though).

Likely something which I'll end up doing eventually.  I don't like
problems which require recompilation, or even changing the engine in any
manner, even if it is just copying and changing one Scheme file and
putting the changed file into your personal load-path.

> The engraver creates a new grob (AccordionRegister ?) carrying a
> markup.  The markup should be created by calling out to a Scheme
> function which would look at the accordionType and accordionRegister.

Hm.  I'll have to take more of a look at things.

David Kastrup

reply via email to

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