Hi Caio,
How about:
\version "2.18.2"
#(define (my-note-head grob)
(let ((duration (ly:grob-property grob 'duration-log)))
(if (>= duration 2)
(grob-interpret-markup grob
#{
\markup \filled-box #'(-0.5 . 0.5) #'(-0.5 . 0.5) #0
#})
(grob-interpret-markup grob
#{
\markup
\override #'(box-padding . 0)
\override #'(thickness . 2)
\box {
\transparent
\filled-box #'(-0.3 . 0.3) #'(-0.3 . 0.3) #0
}
#}
{ c'1 c'2 c'4 c'8 c'16 }
\layout {
\context {
\Score
\override NoteHead.stencil = #my-note-head
}
}
Cheers,
Pierre
2016-01-25 21:17 GMT+01:00 Caio Giovaneti de Barros :
> Hi,
>
> I'm needing a note head style with square note heads. Ideally it should be
> filled for black note heads and open for white notes. I'm struggling to
> understand how to change the note head stencil, let alone change it
> according to note duration. Con someone, please, help?
>
> Thanks!
> Caio
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user