lilypond-user
[Top][All Lists]
Advanced

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

Re: Customizing Rest


From: Reinhold Kainhofer
Subject: Re: Customizing Rest
Date: Mon, 2 Feb 2009 14:51:38 +0100
User-agent: KMail/1.11.0 (Linux/2.6.27-11-generic; KDE/4.2.0; i686; ; )

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Montag, 2. Februar 2009 10:09:55 今井雄治 wrote:
> Hi users.
>
> I want to customize rest by its duration, as following
>     r4 --> black circle
>     r8 --> black circle with under line

Attached is a scheme example how to do this (it checks the duration-log, i.e. 
a quarter rest has a 2-log of 2, an eighth rest has a 2-log of 3, since 
1/8=2^(-3)). Quarter and eighth rests are printed the way you want them, all 
other rests are printed as usual.

The example assigns that function globally. If you want it only for some 
parts, you can simply remove the \layout block and do:

\relative {
    e4. r8 e4 r4
    \override Rest #'stencil = #ly:rest-interface::dot-rests
    e4. r8 e4 r4
    \reset Rest #'stencil
    e4. r8 e4 r4
}

Also note that I changed the circle call from a radius of 0.6 and a thickness 
of 0 to a radius of 0.55 and a thickness of 0.1 (half of the thickness will be 
outside the radius, half of it inside!), because then you get nice anti-
aliasing and the circle will look really rounded.

I've also added that snippet to the LSR, together with some explanations:
http://lsr.dsi.unimi.it/LSR/Item?id=548

Cheers,
Reinhold

- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJhvprTqjEwhXvPN0RAuUdAJ9h6p/9ZK7VkL4ykzmE3UnBCGxIYACfYZzu
cgRAhYLRm8l/sGtW4A9k6Fo=
=rt1E
-----END PGP SIGNATURE-----

Attachment: rounded_rests.pdf
Description: Adobe PDF document

Attachment: rounded_rests.ly
Description: Text Data


reply via email to

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