[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: |
Han-Wen Nienhuys |
Subject: |
Re: Several thoughts for implementing accordion standard bass support |
Date: |
Wed, 20 Jan 2010 18:17:20 -0200 |
On Wed, Jan 20, 2010 at 6:11 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.
I recommend a music function for this.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen