2012/12/23 Paul Morris <p...@paulwmorris.com>: > On Dec 20, 2012, at 7:51 PM, Thomas Morley <thomasmorle...@googlemail.com> > wrote: > >> I think there is no way to align moved noteheads left and right from >> the stem _and_ to keep a correct 'stem-attachment in x-axis-direction >> in all thinkable cases. >> The y-value of 'stem-attachment has to be modified in several situations >> anyway. > > Hi Harm, > > I had some more time to look at this, and I think I may be catching up with > you now. :-) > > I now see that using (/ stem-x-width 2) nicely handles all four possibilities > correctly in terms of positioning note heads relative to the stem on the > X-axis (upwards or downwards stem, moving a note head to the default or to > the opposite-of-default side of the stem). So this is all that is needed to > correctly align notes vertically on either side of the stem. > > But I also see how this means the stem may not attach properly in some cases. > The main (or only?) instance of this seems to be when a note head that is at > the end of a stem has been offset to the non-default side of the stem. It > overlaps only half of the stem width, and this does not look right. (I can't > think of another case where this would be a problem.) > > It might be possible to handle this case automatically in the code (at least > for the X-axis of 'stem-attachment), but I'm not sure it would be worth it > since it can be tweaked manually using your adjustStem function. (But just > for example...) > > if note head is the lowest one on an upwards stem or > if note head is the highest one on a downwards stem > and it has been moved to the non-default side of the stem > then adjust the 'stem-attachment accordingly > > > Also, it seems that changing the 'stem-attachment property moves the stem and > not the note. This preserves the vertical alignment of the notes which is a > good thing, but it basically reverses the usual pattern of how note heads > overlap the stem. (Notes on the non-default side of the stem will now > overlap the full width of the stem, and notes on the default side will now > overlap half the width of the stem -- the opposite of the usual pattern.) > There is no way around this, since offsetting a note at the end of the stem > means you either get the stem attachment right, or keep the usual pattern of > how note heads overlap the stem. And clearly it's better to get the stem > attachment right.
Hi Paul, that's all true and _much_ better explained than I could have done it. I agree to all of it. > So I don't have any further suggestions for the code. I will try to find > some time to come up with a good concise example for the LSR, and put the > default notes on a separate staff above the offset notes. > > Best, > -Paul > Thanks. And I promise to approve it asap. Regards, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user