lilypond-user
[Top][All Lists]
Advanced

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

Re: notes for toms and floortoms


From: Mark Polesky
Subject: Re: notes for toms and floortoms
Date: Sun, 11 Jan 2009 09:10:06 -0800 (PST)

Herman vanHaagen wrote:
> Wow!!,
> this is really great. Thanks! Is there a special rum tutorial 
> where to figure out this kind of stuff?
 
Herman, 

The LSR (LilyPond Snippet Repository) is a good place to start.
http://lsr.dsi.unimi.it/LSR/Search?

and obviously, the LilyPond docs:
http://lilypond.org/doc/v2.12/Documentation/index.html

Learn about about scheme at schemers.org. Here is their list of
recommended textbooks and online tutorials:
http://schemers.org/Documents/#all-texts

Learn about postcript with the classic texts:
"The Blue Book" (Tutorial and Cookbook)
   http://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF
"The Green Book" (Program Design)
   http://www-cdf.fnal.gov/offline/PostScript/GREENBK.PDF
"The Red Book" (Reference)
   http://partners.adobe.com/public/developer/en/ps/PLRM.pdf

If you're adventurous, you can also check out the LilyPond
source code:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=tree
Although I try not to use the search function because it can 
strain the server. See:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=search_help

Or poke around your own copy of LilyPond. On Windows, the path
LilyPond/usr/share/lilypond/current/ gets you in the ballpark.


Most of the code used in the tom-tom example comes from this 
snippet...
http://lsr.dsi.unimi.it/LSR/Item?id=516

As for calculating things like x0, y0, etc. I drew the stencil
with pencil and paper and figured out the relationships needed.
For example, the thickness of the circle-line and the slash are
the same as the thickness of the stem, and the radius of the
circle is such that the top and bottom of the circle line up
with the top and bottom of the higher and lower staff-line,
respectively (given the thickness already set). And the 
endpoints of the slash are such that it fits perfectly in the
corner created by the stem and staff-line (given the thickness
already set).

The functions for making stencils (ly:make-stencil) and getting 
line-thickness (ly:staff-symbol-line-thickness) are here:
http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Scheme-functions#Scheme-functions

I found the default value for the thickness property of Stem 
(1.3 * line-thickness) here:
http://lilypond.org/doc/v2.12/Documentation/user/lilypond-internals/Stem#Stem

in scm/stencil.scm there's a definition...
   (define-public (eps-file->stencil axis size file-name)
...that includes a usage of 'embedded-ps that you could use to
deduce the usage of it, in the absence of the LSR snippet, 
although admittedly, you'd have to know where to look!

Hope this helps!
- Mark


      




reply via email to

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