Hi, On Sat, Mar 21, 2015 at 4:32 PM, tisimst <tisimst.lilyp...@gmail.com> wrote:
> You and me both, Pierre. I've tried for hours to find something that works > automatically. I've managed to use a single notehead for both up- and > down-stem notes, thanks to everyone's help here, but I still have one > problem relating to chords. > > If a notehead, in a chord stack, is forced out of the main column (to the > right for up-stem chords, to the left for down-stem chords) what property > (or relationship between grobs) puts them there? I can't seem to figure it > out. > > - Abraham > > If there's a property which indicates on which side of a stem the note falls, I don't find it. Seems like there definitely should be one! Anyway, here's a snippet which suggests a possible way to go. It prints out the X-coordinate of the note heads in a chord, relative to the organizing NoteColumn. \version "2.19.17" { \override NoteColumn.before-line-breaking = #(lambda (grob) (let ((notes (ly:grob-array->list (ly:grob-object grob 'note-heads)))) (for-each (lambda (note) (format #t "~a at coordinate: ~a~%" (ly:event-property (event-cause note) 'pitch) (ly:grob-relative-coordinate note grob X))) notes) (newline))) <c' d' e' g' c'' d''> <cis'' fis'' gis''> } %%%% And the output: #<Pitch c' > at coordinate: 0.0 #<Pitch d' > at coordinate: 1.251178 #<Pitch e' > at coordinate: 0.0 #<Pitch g' > at coordinate: 0.0 #<Pitch c'' > at coordinate: 0.0 #<Pitch d'' > at coordinate: 1.251178 #<Pitch cis'' > at coordinate: 0.0 #<Pitch fis'' > at coordinate: -1.251178 #<Pitch gis'' > at coordinate: 0.0 Hope this helps!! -David
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user