lilypond-user
[Top][All Lists]
Advanced

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

Re: defining custom note heads


From: v!ictor address@hidden
Subject: Re: defining custom note heads
Date: Tue, 3 Jun 2008 11:20:31 -0400

Hello Brian,

There are two things you need to do to create arbitrary noteheads from
within lilypond:
1. change the NoteHead stencil to the text interface:
\once \override NoteHead  #'stencil = #ly:text-interface::print
2. define the text attribute of the NoteHead. you can put any markup
command you want. The easiest thing to do is to simply call a
musicglyph, as in the example below. With musicglyph you can use any
of the feta font glyphs:
http://lilypond.org/doc/v2.11/Documentation/user/lilypond/The-Feta-font#The-Feta-font

But you can also draw lines, circles, etc. basically anything you can
do in a markup. See
http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Text-markup-commands#Text-markup-commands


%%%%% START %%%%%
\version "2.11.45"

headCircle   = {\once \override NoteHead  #'stencil = #ly:text-interface::print
               \once \override NoteHead #'text = #(markup
#:musicglyph "scripts.flageolet" ) }
headPlus        = {\once \override NoteHead  #'stencil =
#ly:text-interface::print
               \once \override NoteHead #'text = #(markup #:musicglyph
"scripts.stopped")}

{
   \headCircle
   c'4
   \headPlus
   d'4
   % normal
   e'4
}
%%%%% END %%%%%

You can also import eps files...
headEPS   = \once \override NoteHead #'text = #(markup #:epsfile 2 1.3
"image_dir/image.eps")

 but this is not very efficient as the resulting PDF may grow very
large. Also, compilation takes long, don't know why.

hope this is useful,

Victor.


On 5/23/08, Brian Kidd <address@hidden> wrote:
> is there a way to define or import custom note heads? i'm interested
> in using specific symbols to indicate rhythmic notation in hand
> drumming. a picture of the symbols that i'd like to use for note
> heads is attached. sadly this image wasn't created in lilypond, but i
> figure it ought to be possible.
>
> thanks,
> -brian
>
>




reply via email to

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