Automatically change durations: Difference between revisions
Appearance
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series |
mNo edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
It takes two arguments – the scaling factor as a power of two, and the number of dots to be added as a positive integer. | It takes two arguments – the scaling factor as a power of two, and the number of dots to be added as a positive integer. | ||
<lilypond version="2.24" | <lilypond version="2.24"> | ||
music = \relative c'' { a1 b2 c4 d8 r } | music = \relative c'' { a1 b2 c4 d8 r } | ||
| Line 31: | Line 26: | ||
[[Category:Rhythms]] | [[Category:Rhythms]] | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 05:08, 8 December 2025
shiftDurations can be used to change the note lengths of a piece of music.
It takes two arguments – the scaling factor as a power of two, and the number of dots to be added as a positive integer.
\version "2.24"
music = \relative c'' { a1 b2 c4 d8 r }
{
\time 4/2
\music
\time 4/4
\shiftDurations 1 0 \music
\time 2/4
\shiftDurations 2 0 \music
\time 4/1
\shiftDurations -1 0 \music
\time 8/1
\shiftDurations -2 0 \music
\time 6/2
\shiftDurations 0 1 \music
\time 7/2
\shiftDurations 0 2 \music
}