[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Several thoughts for implementing accordion standard bass support
From: |
David Kastrup |
Subject: |
Re: Several thoughts for implementing accordion standard bass support |
Date: |
Wed, 20 Jan 2010 09:11:55 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) |
Han-Wen Nienhuys <address@hidden> writes:
> On Tue, Jan 19, 2010 at 11:55 AM, David Kastrup <address@hidden> wrote:
>
>>>> StdbassEngraver = #`((listeners
>>>> (note-event .
>>>> ,(lambda (engraver event)
>>>> (let* ((pitch (ly:event-property event 'pitch)))
>>>> (ly:event-set-property! event 'pitch
>>>
>>> This looks wrong - engravers should not modify their inputs. Rather,
>>> the engraver should create the Grob that you are interested in, or it
>>> should acknowledge the grob created by another engraver.
>>
>> Obviously, I have no clue whatsoever about what I am doing, and this is
>> the "poke with a stick until it works(TM)" approach.
>>
>> Could you give a code example or outline for either of the possibilities
>> that you outlined?
>
> I am completely unsure what you are trying to achieve. Are you really
> trying to typeset noteheads on a staff, or is it something else?
I am trying to do exactly what the posted code _does_ right now. It
works (maps notes to different octaves than entered, in particular
mapping chord notes to the -1 octave ignoring inversions). At a future
point of time, the criteria might get more intricate and I may want to
analyze the resulting chords. But that is reasonably straightforward to
do.
So right now, I just want to do what the code already does. You are
saying that it does this in a wrong way. So I am interested in the
right way. One that does not work just by luck and won't fall apart
into pieces in more complex situations.
Thanks,
--
David Kastrup