Hi Paul, On Sat, Dec 8, 2012 at 10:24 AM, Paul Morris <[email protected]> wrote: > Hello everyone, I'm writing a scheme function to override the usual > horizontal placement of noteheads relative to the stem (in certain > instances). The only thing that is not working is the final step of setting > the X-offset property of the NoteHead grob. > > I tracked down the problem, as shown in the tiny example below. All the > notes should be moved to the right-hand side of the stem, but the "rel-coord" > variable that is set by "ly:grob-relative-coordinate" is preventing it from > working. After commenting out that variable it works fine. This seems very > odd. Maybe a bug? Any ideas on what's going on or how to get this to work? > > -Paul > > > \version "2.16.1" > > CustomNoteHeads = > #(lambda (grob) > (let* > ( > (note-col (ly:grob-parent grob 0)) > > ;; This... > (rel-coord (ly:grob-relative-coordinate grob notecol 0)) > ) > > ;; ...mysteriously prevents this from working. > (set! (ly:grob-property grob 'X-offset) 1.251178 ) > ) > ) >
In this case you can make use of the 'stem-attachment property: \override NoteHead #'stem-attachment = #'(-0.8 . 0) HTH, David _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
