[icon]

GNU LilyPond

Welcome to the home of the GNU Music Typesetter

What is LilyPond
General information
Simple examples
Complex examples
Download
GNU/Linux binaries
Windows
Source code
Documentation
Tutorial
Manual
Glossary
other ...

Support
Mailing lists
Search
WikiWiki
FAQs

External sites
lilypond.org/development
lilypond.org/stable
ftp.lilypond.org
Mutopia
Other music online

Node:Tuplets, Next:, Previous:Ties, Up:Note entry



Tuplets

Tuplets are made out of a music expression by multiplying all duration with a fraction.

  \times fraction musicexpr

The duration of musicexpr will be multiplied by the fraction. In print, the fraction's denominator will be printed over the notes, optionally with a bracket. The most common tuplet is the triplet in which 3 notes have the length of 2, so the notes are 2/3 of their written length:

  g'4 \times 2/3 {c'4 c' c'} d'4 d'4

[picture of music]

The property tupletSpannerDuration specifies how long each bracket should last. With this, you can make lots of tuplets while typing \times only once, thus saving typing work.

\property Voice.tupletSpannerDuration = #(make-moment 1 4)
\times 2/3 { c'8 c c c c c }

[picture of music]

The format of the number is determined by the property tupletNumberFormatFunction. The default prints only the denominator, but if you set it to the Scheme function fraction-tuplet-formatter, Lilypond will print num:den instead.

The typesetting of brackets and numbers is controlled by the properties tuplet-bracket-visibility and tuplet-number-visibility.

\property Voice.TupletBracket \set #'tuplet-bracket-visibility = ##t
\times 2/3{c'8 d e} \times 2/3{d4 e8}
\property Voice.TupletBracket \set #'tuplet-bracket-visibility = #'if-no-beam
\times 2/3{c d e} \times 2/3{d4 e8}
\property Voice.TupletBracket \set #'tuplet-bracket-visibility = ##f
\times 2/3{c d e} \times 2/3{d4 e8}
\property Voice.TupletBracket \set #'tuplet-number-visibility = ##f
\times 2/3{c d e} \times 2/3{d4 e8}
\property Voice.TupletBracket \set #'tuplet-number-visibility = #'if-no-beam
\times 2/3{c d e} \times 2/3{d4 e8}

[picture of music]

Tuplet brackets are printed as TupletBracket grobs

Go back to index of LilyPond.

Please send GNU LilyPond questions and comments to lilypond-user@gnu.org.

Please send comments on these web pages to lilypond@packages.debian.org

Copyright (c) 1997--2001 Han-Wen Nienhuys and Jan Nieuwenhuizen.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


This page was built from LilyPond-1.4.12 (stable-branch) by

Anthony Fok <lilypond@packages.debian.org>, Tue Mar 12 01:35:39 2002 HKT.