### 1.2.1 Writing rhythms

#### Durations

Durations are designated by numbers and dots. Durations are entered as their reciprocal values. For example, a quarter note is entered using a 4 (since it is a 1/4 note), and a half note is entered using a 2 (since it is a 1/2 note). For notes longer than a whole you must use the \longa (a double breve) and \breve commands. Durations as short as 128th notes may be specified. Shorter values are possible, but only as beamed notes.

\time 8/1
c\longa c\breve c1 c2
c4 c8 c16 c32 c64 c64


Here are the same durations with automatic beaming turned off.

\time 8/1
\autoBeamOff
c\longa c\breve c1 c2
c4 c8 c16 c32 c64 c64


A note with the duration of a quadruple breve may be entered with \maxima, but this is supported only within ancient music notation. For details, see Ancient notation.

If the duration is omitted, it is set to the previously entered duration. The default for the first note is a quarter note.

a a a2 a a4 a a1 a


To obtain dotted note lengths, place a dot (.) after the duration. Double-dotted notes are specified by appending two dots, and so on.

a4 b c4. b8 a4. b4.. c8.


Some durations cannot be represented with just binary durations and dots; they can be represented only by tying two or more notes together. For details, see Ties.

For ways of specifying durations for the syllables of lyrics and ways of aligning lyrics to notes, see Vocal music.

Optionally, notes can be spaced strictly proportionately to their duration. For details of this and other settings which control proportional notation, see Proportional notation.

Dots are normally moved up to avoid staff lines, except in polyphonic situations. Predefined commands are available to force a particular direction manually, for details see Direction and placement.

#### Predefined commands

\autoBeamOff, \dotsUp, \dotsDown, \dotsNeutral.

Music Glossary: breve, longa, maxima, note value, Duration names notes and rests.

Notation Reference: Automatic beams, Ties, Writing rhythms, Writing rests, Vocal music, Ancient notation, Proportional notation.

Snippets: Rhythms.

Internals Reference: Dots, DotColumn.

#### Known issues and warnings

There is no fundamental limit to rest durations (both in terms of longest and shortest), but the number of glyphs is limited: rests from 128th to maxima (8 x whole) may be printed.

#### Tuplets

Tuplets are made from a music expression by multiplying all the durations with a fraction:

\times fraction { music }


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

a2 \times 2/3 { b4 b b }
c4 c \times 2/3 { b4 a g }


The automatic placement of the tuplet bracket above or below the notes may be overridden manually with predefined commands, for details see Direction and placement.

Tuplets may be nested:

\autoBeamOff
c4 \times 4/5 { f8 e f \times 2/3 { e[ f g] } } f4 |


Modifying nested tuplets which begin at the same musical moment must be done with \tweak.

To modify the duration of notes without printing a tuplet bracket, see Scaling durations.

#### Predefined commands

\tupletUp, \tupletDown, \tupletNeutral.

#### Selected Snippets

Entering several tuplets using only one \times command

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

In the example, two triplets are shown, while \times was entered only once.

For more information about make-moment, see "Time administration".

\relative c' {
\time 2/4
\set tupletSpannerDuration = #(ly:make-moment 1 4)
\times 2/3 { c8 c c c c c }
}


Changing the tuplet number

By default, only the numerator of the tuplet number is printed over the tuplet bracket, i.e., the denominator of the argument to the \times command. Alternatively, num:den of the tuplet number may be printed, or the tuplet number may be suppressed altogether.

\relative c'' {
\times 2/3 { c8 c c }
\times 2/3 { c8 c c }
\override TupletNumber #'text = #tuplet-number::calc-fraction-text
\times 2/3 { c8 c c }
\override TupletNumber #'stencil = ##f
\times 2/3 { c8 c c }
}


Permitting line breaks within beamed tuplets

This artificial example shows how both manual and automatic line breaks may be permitted to within a beamed tuplet. Note that such off-beat tuplets have to be beamed manually.

\layout {
\context {
\Voice
% Permit line breaks within tuplets
\remove "Forbid_line_break_engraver"
% Allow beams to be broken at line breaks
\override Beam #'breakable = ##t
}
}
\relative c'' {
a8
\repeat unfold 5 { \times 2/3 { c[ b a] } }
% Insert a manual line break within a tuplet
\times 2/3 { c[ b \bar "" \break a] }
\repeat unfold 5 { \times 2/3 { c[ b a] } }
c8
}


Music Glossary: triplet, tuplet, polymetric.

Learning Manual: Tweaking methods.

Notation Reference: Time administration, Scaling durations, The \tweak command, Polymetric notation.

Snippets: Rhythms.

Internals Reference: TupletBracket, TupletNumber, TimeScaledMusic.

#### Known issues and warnings

When the first note on a staff is a grace note followed by a tuplet the grace note must be placed before the \times command to avoid errors. Anywhere else, grace notes may be placed within tuplet brackets.

#### Scaling durations

You can alter the duration of single notes, rests or chords by a fraction N/M by appending *N/M (or *N if M is 1) to the duration. This will not affect the appearance of the notes or rests produced, but the altered duration will be used in calculating the position within the measure and setting the duration in the MIDI output. Multiplying factors may be combined such as *L*M/N.

In the following example, the first three notes take up exactly two beats, but no triplet bracket is printed.

\time 2/4
% Alter durations to triplets
a4*2/3 gis4*2/3 a4*2/3
% Normal durations
a4 a4
% Double the duration of chord
<a d>4*2
% Duration of quarter, appears like sixteenth
b16*4 c4


The duration of skip or spacing notes may also be modified by a multiplier. This is useful for skipping many measures, e.g., s1*23.

Longer stretches of music may be compressed by a fraction in the same way, as if every note, chord or rest had the fraction as a multiplier. This leaves the appearance of the music unchanged but the internal duration of the notes will be multiplied by the fraction num/den. The spaces around the dot are required. Here is an example showing how music can be compressed and expanded:

\time 2/4
% Normal durations
<c a>4 c8 a
% Scale music by *2/3
\scaleDurations #'(2 . 3) {
<c a f>4. c8 a f
}
% Scale music by *2
\scaleDurations #'(2 . 1) {
<c' a>4 c8 b
}


One application of this command is in polymetric notation, see Polymetric notation.

Notation Reference: Tuplets, Invisible rests, Polymetric notation.

Snippets: Rhythms.

#### Ties

A tie connects two adjacent note heads of the same pitch. The tie in effect extends the duration of a note.

 Note: Ties should not be confused with slurs, which indicate articulation, or phrasing slurs, which indicate musical phrasing. A tie is just a way of extending a note duration, similar to the augmentation dot.

A tie is entered using the tilde symbol ~

a2 ~ a


Ties are used either when the note crosses a bar line, or when dots cannot be used to denote the rhythm. Ties should also be used when note values cross larger subdivisions of the measure:

\relative c' {
r8 c8 ~ c2 r4 |
r8^"not" c2 ~ c8 r4
}


If you need to tie many notes across bar lines, it may be easier to use automatic note splitting, see Automatic note splitting. This mechanism automatically splits long notes, and ties them across bar lines.

When a tie is applied to a chord, all note heads whose pitches match are connected. When no note heads match, no ties will be created. Chords may be partially tied by placing the tie inside the chord.

<c e g> ~ <c e g>
<c~ e g~ b> <c e g b>


When a second alternative of a repeat starts with a tied note, you have to specify the repeated tie as follows:

\repeat volta 2 { c g <c e>2 ~ }
\alternative {
% First alternative: following note is tied normally
{ <c e>2. r4 }
% Second alternative: following note has a repeated tie
{ <c e>2\repeatTie d4 c } }


L.v. ties (laissez vibrer) indicate that notes must not be damped at the end. It is used in notation for piano, harp and other string and percussion instruments. They can be entered as follows:

<c f g>1\laissezVibrer


The vertical placement of ties may be controlled, see Predefined commands, or for details, see Direction and placement.

Solid, dotted or dashed ties may be specified, see Predefined commands.

#### Predefined commands

\tieUp, \tieDown, \tieNeutral, \tieDotted, \tieDashed, \tieSolid.

#### Selected Snippets

Using ties with arpeggios

Ties are sometimes used to write out arpeggios. In this case, two tied notes need not be consecutive. This can be achieved by setting the tieWaitForNote property to #t. The same feature is also useful, for example, to tie a tremolo to a chord, but in principle, it can also be used for ordinary consecutive notes.

\relative c' {
\set tieWaitForNote = ##t
\grace { c16[ ~ e ~ g] ~ } <c, e g>2
\repeat tremolo 8 { c32 ~ c' ~ } <c c,>1
e8 ~ c ~ a ~ f ~ <e' c a f>2
\tieUp
c8 ~ a
\tieDown
\tieDotted
g8 ~ c g2
}


Engraving ties manually

Ties may be engraved manually by changing the tie-configuration property of the TieColumn object. The first number indicates the distance from the center of the staff in staff-spaces, and the second number indicates the direction (1 = up, -1 = down).

\relative c' {
<c e g>2 ~ <c e g>
\override TieColumn #'tie-configuration =
#'((0.0 . 1) (-2.0 . 1) (-4.0 . 1))
<c e g> ~ <c e g>
}


Music Glossary: tie, laissez vibrer.

Notation Reference: Automatic note splitting.

Snippets: Rhythms.

Internals Reference: LaissezVibrerTie, LaissezVibrerTieColumn, TieColumn, Tie.

#### Known issues and warnings

Switching staves when a tie is active will not produce a slanted tie.

Changing clefs or octavations during a tie is not really well-defined. In these cases, a slur may be preferable.

Other languages: français, español, deutsch.