Han-Wen Nienhuys <hanw...@gmail.com> writes: > On Tue, Jan 19, 2010 at 11:55 AM, David Kastrup <d...@gnu.org> 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 _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel