lilypond-user
[Top][All Lists]
Advanced

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

Re: Noteheads


From: Maximilian Albert
Subject: Re: Noteheads
Date: Sun, 01 Apr 2007 14:19:23 +0200
User-agent: IceDove 1.5.0.10 (X11/20070307)

Klaus Muth schrieb:

> How can I - if at all - design my own noteheads?

Of course you can. Note, however, that it requires a knowledge of
metafont, and you need to recompile lilypond to actually use the new glyphs.

Metafont was written by Donald Knuth almost thirty years ago (as a
counterpart to TeX) for precisely the purpose of designing fonts. What
you basically do when designing a new glyph is to first specify a couple
of points using algebraic relations between their coordinates, in the
spirit of "let the x-coordinate of z5 be located halfway between those
of z1 and z2, and let it lie on the line joining z3 and z4". Actually,
that's already a very complicated example; in most cases it's more like
"let z1, z2, and z3 all have the same y-coordinate".

As soon as these points are defined, you tell metafont how to connect
them, choosing between various different pen shapes, stroke weigths,
etc. This produces the final glyph. A very simplistic example would be
the letter 'L'. It could be designed by specifying three points (the
'vertices' of the letter) and joining them with two line strokes, one
vertical and one horizontal.

It's a fun experience to learn metafont, so if you have the time and are
a bit inclined to programming, give it a try. There is a nice
introductory tutorial available at

   http://metafont.tutorial.free.fr/

I'm certain that there are plenty of others, too. Eventually, however, I
recommend reading "The Metafont Book" by Knuth himself (search the
archives for another thread on the topic where Han-Wen provided a link).
It looks a bit daunting at first glance, but it's excellently written
and really fun to read.

A final step to make the notehead actually usable is to include a line
in scm/output-lib.scm to tell lilypond which glyph to use for the new
notehead style (see line 151 ff.).

Hope this helps a bit.
Have fun,

Max




reply via email to

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