lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Square note head style


From: Pierre Perol-Schneider
Subject: Re: Square note head style
Date: Mon, 25 Jan 2016 22:18:14 +0100

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 <address@hidden>:
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
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

[Prev in Thread] Current Thread [Next in Thread]