Jump to content

Entering several tuplets using only one \tuplet command: Difference between revisions

From LilyPond wiki
No edit summary
m New category
 
Line 16: Line 16:
[[Category:Rhythms]]
[[Category:Rhythms]]
[[Category:Syntax and expressions]]
[[Category:Syntax and expressions]]
[[Category:Included in the official documentation]][[Category:Snippet]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Latest revision as of 23:22, 21 November 2025

The property tupletSpannerDuration sets how long each of the tuplets contained within the brackets after \tuplet should last. Many consecutive tuplets can then be placed within a single \tuplet expression, thus saving typing.

There are several ways to set tupletSpannerDuration. The command \tupletSpan sets it to a given duration, and clears it when instead of a duration \default is specified. Another way is to use an optional argument with \tuplet.

\version "2.24"

\relative c' {
  \time 2/4
  \tupletSpan 4
  \tuplet 3/2 { c8^"\\tupletSpan 4" c c c c c }
  \tupletSpan \default
  \tuplet 3/2 { c8^"\\tupletSpan \\default" c c c c c }
  \tuplet 3/2 4 { c8^"\\tuplet 3/2 4 {...}" c c c c c }
}