2009/11/6 胡海鹏 - Hu Haipeng <
hhpmusic@...>:
> I recently asked a composer about noteheads. In Penderecki's scores, a
> normal triangle with top upwards means as high as possible, and vice versa.
> But in LP, I only find a single triangle notehead. Is it possible to invert
> it?
Hi Haipeng,
I'm not sure what these triangles should look like, but here's a
possible solution:
downTriangle =
#(define-music-function (parser location music) (ly:music?)
#{
\override NoteHead #'stencil =
#(lambda (grob)
(grob-interpret-markup grob
(markup #:rotate 180 #:musicglyph "noteheads.s0do")))
\override NoteHead #'stem-attachment =
#(lambda (grob)
(let ((thickness (ly:staff-symbol-line-thickness grob)))
(cons 1 (/ thickness 2))))
$music
\revert NoteHead #'stencil
\revert NoteHead #'stem-attachment
#})
upTriangle =
#(define-music-function (parser location music) (ly:music?)
#{
\override NoteHead #'stencil =
#(lambda (grob)
(grob-interpret-markup grob
(markup #:musicglyph "noteheads.s0do")))
\override NoteHead #'stem-attachment =
#(lambda (grob)
(let ((thickness (ly:staff-symbol-line-thickness grob)))
(cons 1 (/ thickness 2))))
$music
\revert NoteHead #'stencil
\revert NoteHead #'stem-attachment
#})
\relative c' { c d e \upTriangle f g \downTriangle { a b } c }
Cheers,
Valentin
_______________________________________________
lilypond-user mailing list
lilypond-user@...
http://lists.gnu.org/mailman/listinfo/lilypond-user