Here is my very first attempt at making custom noteheads. The shape is what we
desire, but there are two questions that I have.
1. How does one achieve an elliptical counter in unfilled notes? I know how to
do this in Postscript, but not here.
2. How can the stem alignment be corrected in the chord situation illustrated?
This is based on concepts in LSR-861, but I don’t want to call an adjustment
function for stems every time they wander off, as used in that snippet.
Andrew
\version "2.19.18"
#(define exp-stencil-1
(lambda (grob)
(let* ((duration (ly:grob-property grob 'duration-log))
(filled? (if (> duration 1) #t #f))
(stil-1 (make-partial-ellipse-stencil 0.65 0.26 10 10 0.15 #t
filled?))
(stil-2 (ly:stencil-rotate stil-1 45 0 0))
)
stil-2)))
treble = \relative c'' {
\clef treble
\time 4/4
c c8 c16 c2 c16 |
c1
b4 bes a ais
<bes cis des e fis ges>8
}
bass = \relative c {
\clef bass
\time 4/4
c4 c8 c16 c2 c16 |
c1
d4 dis ees e
\stemUp
<c d e f g>4
}
\score {
\new PianoStaff \with {
}
<<
\new Staff = "treble" { \treble }
\new Staff = "bass" { \bass }
>>
\layout {
\context {
\Score
\override NoteHead.stencil = #exp-stencil-1
\override NoteHead.stem-attachment = #'(0.75 . 0.7)
}
}
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user