lilypond-user
[Top][All Lists]
Advanced

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

Re: Colored note heads with black outline


From: Pierre Perol-Schneider
Subject: Re: Colored note heads with black outline
Date: Wed, 9 Oct 2013 10:10:23 +0200




2013/10/9 Paul Morris <address@hidden>

Hi Onno,
The code below should do what you want.  I combined Pierre's outlined note
heads with some code I use to automatically override note head stencils
based on their pitch.  It creates outlines around all note heads regardless
of their color, and it requires LilyPond 2.17.



Thanks Paul, your code is much better than the one I was going to put.
Looks like a Christmas tree :)
 

            ((= dur-log 1)
             (grob-interpret-markup grob
               #{ \markup {
                 \combine
                 \translate-scaled #'(0.11 . -0.01)
                 \scale #'(1 . 0.82)
                 \rotate #'7
                 \magnify # 0.85
                 \musicglyph #"noteheads.s1"
                 \combine
                 \musicglyph #"noteheads.s1"
                 \translate-scaled #'(0.07 . 0)
                 \scale #'(1.02 . 0.98)
                 \rotate #'2
                 \magnify # 0.9 \with-color #clr
                 \musicglyph #"noteheads.s1"
               } #} ))

Here, I'd like to change some settings in order to re-center the colored notehead :


\combine

\musicglyph #"noteheads.s2"

\translate-scaled #'(0.05 . 0)

\scale #'(1.03 . 0.98)

\rotate #'3

\magnify # 0.9 \with-color #clr

\musicglyph #"noteheads.s2" 

 
\new Staff \with
{ \override NoteHead.before-line-breaking = \coloredNoteHeads }
{ \music }

Well, your code makes me noticed that the layer change with the color... weird.
So better add it :

\new Staff \with {

\override NoteHead.layer = #2

\override NoteHead.before-line-breaking = \coloredNoteHeads }

{ \music }


Cheers,

P.


reply via email to

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