> On Feb 8, 2016, at 11:33 AM, Paul Morris <p...@paulwmorris.com> wrote: > > To make things easier, I can imagine a user function that returns a list of > line positions based on a thickness argument (and maybe optionally a line > pattern list). So for a staff with a single line at position '(2) it would > return '(1.9 2 2.1) or maybe just '(1.9 2.1) when given a thickness > argument of 0.2
\version "2.18.2" #(define (thicker-line-positions thick pattern) (let ((th (/ thick 2))) (append-map (lambda (ln) (list (- ln th) ln (+ ln th))) pattern))) % #(display (thicker-line-positions 0.1 '(-4 -2 0 2 4))) % displays: (-4.05 -4 -3.95 -2.05 -2 -1.95 -0.05 0 0.05 1.95 2 2.05 3.95 4 4.05) #(define (line-positions-callback thick pattern) (lambda (grob) (thicker-line-positions thick pattern))) \relative { c'1 c c c } \relative { \override Staff.StaffSymbol.line-positions = #(lambda (grob) (thicker-line-positions 0.2 '(-4 -2 0 2 4))) c'1 c c c } \relative { \override Staff.StaffSymbol.line-positions = #(line-positions-callback 0.2 '(-4 -2 0 2 4)) c'1 c c c } %%%%%%%%%%%%%%%%%% If we wanted to get extra fancy, we might be able to get the line-thickness property from the grob, and then use that to calculate things... such that when you entered X as a thickness input it would result in the same line thickness as entering X directly as a line-thickness value. …or there’s visual eyeballing and trial and error with the above. Cheers, -Paul _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user